Skip to content

Make Prod deploys aware of runs affecting same models #5825

@gjesse

Description

@gjesse

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:

  1. acquire per-logical-model locks that block scheduled runs for those models during the final catch-up + promotion phase, or
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions