Skip to content

allow for configuring pr preview default start and min intervals separately#5824

Open
gjesse wants to merge 2 commits into
SQLMesh:mainfrom
gjesse:be-better-about-previewing
Open

allow for configuring pr preview default start and min intervals separately#5824
gjesse wants to merge 2 commits into
SQLMesh:mainfrom
gjesse:be-better-about-previewing

Conversation

@gjesse
Copy link
Copy Markdown
Contributor

@gjesse gjesse commented Jun 2, 2026

Summary

This updates SQLMesh PR preview planning so forward-only preview intervals can be controlled independently from the regular PR backfill window.

The GitHub bot now supports separate preview defaults for forward-only changes, allowing PR environments to keep broad default backfills where needed without forcing large preview builds for massive forward-only models.

This also fixes a related planning issue where preview fallback dates could accidentally constrain explicitly selected non-preview backfills when preview models were present. Explicit backfill_models selections now keep their normal model-derived interval behavior, while preview fallback starts are only applied when SQLMesh is implicitly selecting the backfill scope.

Changes

  • Add GitHub bot config for forward-only PR preview windows:
    • default_pr_preview_start
    • pr_preview_min_intervals
  • Pass preview-specific options through PR planning.
  • Ensure forward-only previews can be capped independently from default_pr_start.
  • Do not bind explicit non-preview backfills to short preview intervals when preview models are present.
  • Cover both forward-only and non-forward-only preview paths with regression tests.

Validation

  • Added focused unit coverage for the new planner behavior
  • Added GitHub bot config/controller test coverage
  • Ran targeted pytest and ruff checks

Checklist

  • I have run make style and fixed any issues
  • I have added tests for my changes (if applicable)
  • All existing tests pass (make fast-test)
  • My commits are signed off (git commit -s) per the DCO

Signed-off-by: Jesse Hodges <hodges.jesse@gmail.com>
@gjesse gjesse changed the title Be better about previewing allow for configuring pr preview default start and min intervals separately Jun 2, 2026
@gjesse
Copy link
Copy Markdown
Contributor Author

gjesse commented Jun 2, 2026

I am adding to this to also fix #5789, as they are very closely related

Signed-off-by: Jesse Hodges <hodges.jesse@gmail.com>
@gjesse gjesse force-pushed the be-better-about-previewing branch from 8b75757 to efa54fa Compare June 2, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant