Repository navigation
Convert or delete the last legacy cases - #4580
Open
evanchooly wants to merge 1 commit into
Open
evanchooly wants to merge 1 commit into
evanchooly wants to merge 1 commit into
Conversation
$type's multiple-data-types case converts with alternative commands: the scenario carries the page's other spellings, Morphia's command must equal one, and the reference runs that one. $rand's case converts after its body gains the page's _id exclusion and its ledger entry a reviewed PROJECT_ID_FIRST rule. The three cases whose pages print unparseable results are deleted and recorded. No legacy fixture directory remains.
This branch has not been deployed
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.
As you decided: fix what's fixable, delete the rest. Stacked on #4579.
Problem
Five legacy cases kept the legacy fixture loader alive:
$type"Querying by Multiple Data Types": the page runs two equivalent commands,$type: [2, 1]and$type: ["string", "double"], and conversion refused declared alternative commands.$rand"Select Random Items From a Collection": the page projects{_id: 0, name: 1, registered: 1}. The test dropped_idwithremoveIdsinstead, and Morphia writes exclusions after inclusions anyway; as a pinned reference, the case couldn't declarePROJECT_ID_FIRST.$tan(radians),$densify(time series) and$graphLookup(across collections): the pages' printed results don't parse, because of page typos such as a missing comma or quote.Change
FormMigration.documentedkeeps a declared case's other spellings.action.alternatives, in the action's own shape, and the declared rule itself no longer appears in the scenario's rules.OperatorCaseRunnerrequires Morphia's command to equal one documented spelling, strictly and after the declared rules; the reference then runs that spelling.convertibleno longer refuses alternatives.$typeconverts and passes.addedRules(rules plus reason) for a pinned reference, which declares no rules itself.$rand's body gains.projection().exclude("_id"), a reviewed body edit, and its entry addsPROJECT_ID_FIRST: Morphia writes inclusions before exclusions, and_id's position doesn't change the output.deleted-fixtures.json. The two declared ones also record their already-retired locks' digests, since their overrides are gone.TestTanandTestDensify, left with no tests, are removed.cutover.jsonnow lists no legacy-only cases, and the tests that assumed some construct their own records.Result
No legacy fixture directory remains: 386 cases are on the runner. The next PR removes the legacy loader's code from
TemplatedTestBase.Verification
TestTypeandTestRandpass under Critter, then reflection.Self-reviewed only: the independent reviewers are out of quota until 2026-11-26.