-
Notifications
You must be signed in to change notification settings - Fork 479
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
Allow the import script to run on levelbuilder #38244
Conversation
bin/oneoff/import_unit_details.rb
Outdated
@@ -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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
lib/cdo/lesson_import_helper.rb
Outdated
# 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
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: