Repository navigation
OpenConceptLab/ocl_issues#3010 | Expansion records whether version create built it with lock or latest, and a rebuild follows that - #986
Merged
Conversation
…eate built it with lock or latest, and a rebuild follows that
…st evaluates value-set-only references as built, whatever the toggle
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.
Part of OpenConceptLab/ocl_issues#3010. Follow-up to #980 and bd6b11a.
A collection version built with
lockorlatestevaluates its references uncapped (_async) and swaps HEAD rows for resource versions. A rebuild has to do the same to give the same members. Until nowseed_childrenworked that out from the lock toggle and the expansion'sautoexpand-<version>mnemonic, which goes wrong in two cases:lock/latestexpansion rebuilt capped at 1,000 and kept HEAD rows, so its members changed.Change: a nullable
Expansion.built_with(lock,latest, or null), set when version create builds the expansion with that choice. A rebuild uses it in place of the toggle and the mnemonic: one built withlock/latestis rebuilt uncapped with HEAD rows swapped, whatever the toggle or default expansion is now; everything else rebuilds as before. The version's references are still swapped only when that expansion is the default.Migration
0072_expansion_built_with: adds the nullable column, with no data migration. Existing expansions stay null, which is right for them: none was built throughlock/latest(that path needs #980 with the lock toggle on, and the toggle is off in production), and marking them would change their rebuilds.Tests:
lockexpansion rebuilt after the toggle is turned off keeps its members past the cascade cap.built_withis set.pylint -j0 core/exits 0;makemigrations --checkfinds nothing missing; collections, collection and value set integration, URL registry, sources and tasks suites pass (837).🤖 Generated with Claude Code