Repository navigation
Conversation
Dev builds share version strings, so migration steps cannot be selected by version when upgrading from a dev build. Plan exactly the builtins whose fingerprint changed instead: evolve where persist accepts the new schema, replace otherwise. Also stop reusing a same-version replacement entry that names the shard the builtin already uses. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Prototype, opened as a draft. Not ready for review: it exists so SQL-652 and SQL-663 can point at working code.
Motivation
Upgrades from a dev build cannot select builtin migration steps by version, because dev builds share version strings. At an equal version string the migration is skipped entirely (SQL-663), and at a different one every builtin is evolved in place, ignoring
Replacementsteps (SQL-652). An incompatible builtin schema change then crashes environmentd. #39597 retypes two columns ofmz_materialized_view_refresh_strategies, which makes both failures deterministic.Change
Evolutionwhere persist accepts the new schema,Replacementotherwise. Return early only when that plan is empty.Tests
Two turmoil tests in
builtin_schema_migration_tests.rs: dev sources at an equal and at an older version string, and a repeated replacement at the same version.Not covered yet: dev upgrades under 0dt (a read-only boot, then promotion).
🤖 Generated with Claude Code