fix: index was being ignored during upgrades#5062
Merged
baszalmstra merged 4 commits intoprefix-dev:mainfrom Dec 4, 2025
Merged
Conversation
tdejager
commented
Dec 4, 2025
Co-authored-by: Tim de Jager <tdejager89@gmail.com>
baszalmstra
approved these changes
Dec 4, 2025
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.
Description
Fixes #4659
The problem is that the index was not retained when doing an upgrade, so that meant it was using the wrong index to do the dependency upgrade. I also though a
TryFromfrom a tuple that does merging is really unclear, so I made this into a function on the struct itself. Now we correctly take the index into account when updating.How Has This Been Tested?
I've not tested it manually but I feel the automated test is essentially the user-test in this case. I tested that it fails without this change and succeeds with this change.
AI Disclosure
Tools: {e.g., Claude, Codex, GitHub Copilot, ChatGPT, etc.}
Checklist:
schema/model.py.