Migrate more misc ui-test units' levels into ui test partition - #74562
Draft
davidsbailey wants to merge 1 commit into
Draft
Migrate more misc ui-test units' levels into ui test partition#74562davidsbailey wants to merge 1 commit into
davidsbailey wants to merge 1 commit into
Conversation
Run bin/curriculum/clone_ui_test_levels.rb on the four remaining ui-test-*
units that still referenced production levels:
ui-test-unnumbered-lessons
unnumbered-lesson-level-one -> UI Test unnumbered-lesson-level-one (new)
ui-test-versioned-script-2017
courseB_video_Unspotted -> UI Test courseB_video_Unspotted (new)
ui-test-versioned-script-2019
courseB_video_Unspotted -> UI Test courseB_video_Unspotted (shared)
ui-test-single-unit-2026
K-1 Artist1 1 -> UI Test K-1 Artist1 1 (existing)
Standalone_Artist_9 -> UI Test Standalone_Artist_9 (existing)
flappy_1 -> UI Test flappy_1 (new)
flappy_11 -> UI Test flappy_11 (new)
Four new level files for seven repointed script_levels. The two
versioned-script units share one level, so the second unit lands on the
clone the first one created; the two Artist clones already existed, from
ui-test-csf (#73718) and ui-test-artist earlier in this stack, and were
found by name. That get-or-create by name is what keeps a level shared by
several units to a single copy.
All of these are plain custom levels: no contained levels, no project
templates, no sublevels, no encrypted properties, no rubrics. Each new
clone differs from its source only in name, created_at, updated_at,
audit_log, and the ordering of null-valued properties.
ui-test-shared-unit is already migrated -- #73718 did it as part of that
PR's prove-out -- so it is not touched here. Running the script on it
raises on its first script_level ("UI Test Sample Free Response" already
carries the prefix), which is the guard against double-prefixing.
With this commit, none of the 25 ui-test-* units whose script_json lives
in dashboard/test/ui/config/scripts_json references a production level.
What remains are the deprecated blockly levels of ui-test-maze and
ui-test-shared-unit, which are exempt from the partition.
levelbuilder_mode is off in locals.yml here, so the script was loaded
under `rails runner` with Rails.application.config.levelbuilder_mode set
for that process, as in the parent commits.
Verified:
- Every committed .level file is byte-identical to Level#to_xml for its
row, at the path Policies::LevelFiles.level_file_path picks: nothing
here is hand-edited or misfiled.
- Rebuilt from the committed files alone: destroyed the four new clone
rows, cleared units.md5 on the four units so the incremental seed could
not skip them, then ran seed:custom_levels_ui_tests and
seed:reseed_scripts_ui_tests. All four units come back with every
script_level on a UI Test level and no production level.
- Every migrated level page renders against a local dashboard: all four
level pages of ui-test-single-unit-2026 and the level page of
ui-test-unnumbered-lessons and ui-test-versioned-script-2019 return 200
and serve the clone. ui-test-versioned-script-2017's level page redirects
to the 2019 version for an unassigned student, as it did before.
- Local UI features, `runner.rb -l` against a dashboard on localhost:3000:
teacher_tools/unnumbered_lessons.feature (1 scenario),
teacher_tools/course_overview.feature (5) and
teacher_tools/course_versions.feature (3) pass, as does the "Unit
overview for unit in single-unit course" scenario of
teacher_tools/script_overview.feature, which walks the 2025 -> 2026
version redirect into ui-test-single-unit-course-2026. Between them these
load all four units.
- That feature's other two scenarios, "Viewing student progress" and "Unit
overview contents", fail here for an environmental reason that predates
the branch: both wait on /courses/allthethingscourse/units/1, which 500s
on a box with no properties_encryption_key. Two of allthethings'
LevelGroups are encrypted, so the DSL seed skips their content and
LevelGroup#pages returns nil under Unit#summarize
(level_group.rb:113 via script_level.rb:548). Nothing in this commit
touches allthethings.
Incidental churn in the four script_json files, from re-serializing: a new
serialized_at, a level_keys property on each repointed script_level (set by
the clone script, as in the units migrated by #73718 and #74377), and an
empty jit_pl_concepts_lessons array, a seed model added since these four
files were last written.
[reset db] so drone seeds from empty instead of incrementally, which is
the path a fresh CI container takes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Run bin/curriculum/clone_ui_test_levels.rb on the four remaining ui-test-* units that still referenced production levels:
Four new level files for seven repointed script_levels. The two versioned-script units share one level, so the second unit lands on the clone the first one created; the two Artist clones already existed, from ui-test-csf (#73718) and ui-test-artist earlier in this stack, and were found by name. That get-or-create by name is what keeps a level shared by several units to a single copy.
All of these are plain custom levels: no contained levels, no project templates, no sublevels, no encrypted properties, no rubrics. Each new clone differs from its source only in name, created_at, updated_at, audit_log, and the ordering of null-valued properties.
ui-test-shared-unit is already migrated -- #73718 did it as part of that PR's prove-out -- so it is not touched here. Running the script on it raises on its first script_level ("UI Test Sample Free Response" already carries the prefix), which is the guard against double-prefixing.
With this commit, none of the 25 ui-test-* units whose script_json lives in dashboard/test/ui/config/scripts_json references a production level. What remains are the deprecated blockly levels of ui-test-maze and ui-test-shared-unit, which are exempt from the partition.
levelbuilder_mode is off in locals.yml here, so the script was loaded under
rails runnerwith Rails.application.config.levelbuilder_mode set for that process, as in the parent commits.Verified:
runner.rb -lagainst a dashboard on localhost:3000: teacher_tools/unnumbered_lessons.feature (1 scenario), teacher_tools/course_overview.feature (5) and teacher_tools/course_versions.feature (3) pass, as does the "Unit overview for unit in single-unit course" scenario of teacher_tools/script_overview.feature, which walks the 2025 -> 2026 version redirect into ui-test-single-unit-course-2026. Between them these load all four units.Incidental churn in the four script_json files, from re-serializing: a new serialized_at, a level_keys property on each repointed script_level (set by the clone script, as in the units migrated by #73718 and #74377), and an empty jit_pl_concepts_lessons array, a seed model added since these four files were last written.
[reset db] so drone seeds from empty instead of incrementally, which is the path a fresh CI container takes.
Testing story
Deployment notes