Prod deploys should coordinate with scheduled runs at logical-model granularity.
Current behavior:
A prod deploy can build/materialize a replacement snapshot, then fail promotion with:
"Detected missing intervals for model ..., interrupting your current plan. Please re-apply your plan."
This happens when the scheduler advances the existing prod snapshot for the same logical model while the deploy is still running. The new snapshot is then missing intervals that were added after the deploy plan was computed.
Desired behavior:
For affected incremental models, deploy should either:
- acquire per-logical-model locks that block scheduled runs for those models during the final catch-up + promotion phase, or
- automatically replan/retry when this exact no-gaps race is detected.
Ideal flow:
- Build and materialize the plan normally.
- Before promotion, acquire locks for affected logical model names.
- Recompute missing intervals against current prod state while holding those locks.
- Backfill any newly-created intervals.
- Promote the new snapshots.
- Release locks.
This avoids blocking unrelated scheduled models and prevents manual re-apply loops for hourly/high-frequency models.
Prod deploys should coordinate with scheduled runs at logical-model granularity.
Current behavior:
A prod deploy can build/materialize a replacement snapshot, then fail promotion with:
"Detected missing intervals for model ..., interrupting your current plan. Please re-apply your plan."
This happens when the scheduler advances the existing prod snapshot for the same logical model while the deploy is still running. The new snapshot is then missing intervals that were added after the deploy plan was computed.
Desired behavior:
For affected incremental models, deploy should either:
Ideal flow:
This avoids blocking unrelated scheduled models and prevents manual re-apply loops for hourly/high-frequency models.