Repository navigation
FIX: Load scenario results from v0.13 and v0.14 databases after upgrade - #4161
Open
Utkarsh Bahuguna (u7k4rs6) wants to merge 2 commits into
Open
Utkarsh Bahuguna (u7k4rs6) wants to merge 2 commits into
Utkarsh Bahuguna (u7k4rs6) wants to merge 2 commits into
Conversation
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.
Scenario rows from v0.13 and v0.14 kept scenario_init_data, which was always JSON null for built-in scenarios, and the rename in d4e6f8a0b2c4 carried that null into scenario_identifier. get_scenario_result then raised TypeError on it, which broke get_scenario_results_async for the whole database. Now a null stored identifier falls back to the row's scenario_name, so the old run loads with its name and attack results.
The new migration test seeds a v0.14-shaped scenario row just before the rename, lets SQLiteMemory upgrade it to head and lists scenario results. It fails on main and passes here.
Fixes #4156