Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the import script to run on levelbuilder #38244

Merged
merged 6 commits into from
Dec 17, 2020

Conversation

bethanyaconnor
Copy link
Contributor

@bethanyaconnor bethanyaconnor commented Dec 14, 2020

Resolves PLAT-573. Adds levelbuilder to the list of environments that can run the import script and presents the import script from being run on stable scripts.

Links

Testing story

Reviewer Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@bethanyaconnor bethanyaconnor changed the title Add levelbuilder to the list of environments that can run the import script Allow the import script to run on levelbuilder Dec 15, 2020
@@ -83,6 +83,8 @@ def main(options)
script = Script.find_by_name!(unit_name)
log "found code studio script name #{script.name} with id #{script.id}"

raise "Trying to import a script that is marked as stable" if script.is_stable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we change this to check that the script is not hidden instead, here and below? all stable scripts should be visible, but checking for visible will protect scripts like dance party too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

# In the future, only levelbuilder should be added to this list.
raise unless [:development, :adhoc].include? rack_env
raise unless [:development, :adhoc, :levelbuilder].include? rack_env
raise if lesson.script.is_stable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just noting that this means we won't be able to re-import the 20-21 scripts in development or adhoc after this, which is fine because we can/should be importing the 21-22 scripts now that they are available.

Copy link
Member

@davidsbailey davidsbailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@bethanyaconnor bethanyaconnor merged commit 5ff1df9 into staging Dec 17, 2020
@bethanyaconnor bethanyaconnor deleted the import-script-runnable-on-levelbuilder branch December 17, 2020 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants