fix: Ensure that prod/dev interval and physical model logic consistently uses Deployability - #5988
Open
davem-bis wants to merge 5 commits into
Conversation
…deployability. Signed-off-by: davem-bis <68955845+davem-bis@users.noreply.github.com>
Signed-off-by: davem-bis <68955845+davem-bis@users.noreply.github.com>
…ndirect-non-breaking-deployable-representative-mismatch
…ty instead of representativeness for determining whether dev or prod instance of each should be used. Signed-off-by: davem-bis <68955845+davem-bis@users.noreply.github.com>
Signed-off-by: davem-bis <68955845+davem-bis@users.noreply.github.com>
davem-bis
marked this pull request as ready for review
August 26, 2026 14:03
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 #5793.
Changes the logic determining whether to use the prod or dev instance of intervals or physical model to rely solely on deployability. Previously this was inconsistently using either deployability and representativeness, leading to non-idempotent behaviour in non-prod environments.
Test Plan
INDIRECT_BREAKING_CHANGESsnapshots to prove idempotence.sqlmesh initsqlmesh planAdd
'ABC' AS extra_columntoincremental_model.sqlsqlmesh plan indirect_non_breakingsqlmesh runsqlmesh run indirect_non_breakingsqlmesh fetchdf "UPDATE sqlmesh._intervals SET end_ts = end_ts - 86400000, start_ts = start_ts - 86400000, last_altered_ts = last_altered_ts - 86400000"sqlmesh run indirect_non_breakingsqlmesh run indirect_non_breakingindirect_non_breakingseed_modelincremental_modelfull_modelfull_modelnow uses the__devphysical model, and derives missing intervals from there, and points at that physical model in the virtual layer.Checklist
make styleand fixed any issuesmake fast-test)git commit -s) per the DCO