fix: prevent skipped model upgrades across task merges and rollbacks#428
Open
Rob-Morris wants to merge 2 commits into
Open
fix: prevent skipped model upgrades across task merges and rollbacks#428Rob-Morris wants to merge 2 commits into
Rob-Morris wants to merge 2 commits into
Conversation
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.
Problem
PrimitiveError(InvalidEnumSelector)when a payload used a discriminant that only existed in the upgraded schema.models.schemaand/schemaout of sync with the actual table columns.table ... has no column named ...), read failures (no such column), and retries against stale in-memory state.Cause
ALTER TABLE ...could be undone while the in-memory model and token-registration caches remained ahead of committed SQLite state, so retry logic could silently skip required upgrade work.v1.5.0(2025-04-29).What Changed
Scope
Review-Relevant Side Effects
Validation
cargo test -p torii-task-networkcargo test -p torii-cachecargo test -p torii-sqlite model_optionalcargo check -p torii-cache -p torii-storage -p torii-sqlite -p torii-processors -p torii-indexercargo test -p torii-cli --libcargo test -p torii-indexer test_rollback_replays_model_upgrade_after_cache_reset -- --nocaptureKATANA_RUNNER_BIN=/path/to/katana cargo test -p torii-indexer test_rollback_resets_token_registry_for_retry -- --nocapture