fix!: correctly identify keys to make deterministic#4984
Merged
Conversation
5d8b68d to
a355552
Compare
a355552 to
60ee5ee
Compare
crericha
reviewed
Jul 17, 2025
crericha
reviewed
Jul 17, 2025
crericha
reviewed
Jul 17, 2025
crericha
reviewed
Jul 17, 2025
crericha
reviewed
Jul 17, 2025
Contributor
|
Will this mean user dicts are still non-deterministic from plan to plan? |
bbdc69d to
d2d10be
Compare
Collaborator
Author
Yes I have basically changed the implementation to be as conservative as possible. If we see an issue with this in the future we can expand to include them. |
crericha
approved these changes
Jul 17, 2025
d2d10be to
4b53296
Compare
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.
Fixing a mistake in this PR: #4925
The issue is that the user could have defined a variable in the global namespace and this PR would sort the dictionary which would cause an issue for the user if they rely on the dictionary order. Therefore this PR makes the sorting logic focused just on the known dictionaries that we control: sqlmesh vars and sqlmesh blueprint vars. It also changes the sorting to only sort on the root level dict instead of doing a recursive sort. This is because a user could define a dict as a value in variable/blueprint variables and we don't want to change that.
The previous 85 migration is updated to do the correct thing. 86 migration was added to try to detect if the user may have been impacted by this bug and if so it will log a warning.