You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prod plan rebuilds a child model after the janitor deletes an old forward-only parent version #6307
A prod plan can backfill a model's full history when only another parent's metadata changed. This happens if the janitor has deleted an older forward-only version of one of the model's parents. It started with #6214, which isn't in a release yet. v0.236.4 doesn't backfill in the same scenario.
To reproduce, start with incremental models a and b, and a child c that joins them:
Apply all three to prod.
Change the value of a column in a and apply it to dev with --forward-only. Do this twice, with a different value each time.
Run sqlmesh janitor --ignore-ttl. With default settings, the first dev version of a expires after a week.
Change only the owner of b, then run sqlmesh plan prod without --forward-only.
Expected: c keeps its current version and isn't backfilled. That's what happens if you skip step 3.
Actual: c gets a new version and a full backfill.
The plan builder looks up whether each earlier version of a was forward-only. If a version is no longer in state, it's treated as not forward-only, so c is rebuilt. #6214 chose that fallback on purpose, but the janitor deletes old versions routinely.
Reproduced on main at 9fa0b6e with DuckDB, using the Python API.
Activity