You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "github-actions[bot] (via GitHub)" <gi...@apache.org> on 2026/09/08 04:10:57 UTC
[PR] [v3-3-test] Fix Dag scheduling stall after switching to a coarser cron (#72498) [airflow]
github-actions[bot] opened a new pull request, #72679:
URL: https://github.com/apache/airflow/pull/72679
* Fix Dag scheduling stall after switching to a coarser cron
Changing a Dag's schedule to a coarser cron (e.g. hourly to daily) could
make the realigned next run collide with the logical_date of the run
already on record. The scheduler would then loop on "run already exists;
skipping dagrun creation" forever instead of advancing, since every input
to the recompute (the DAG's static start_date, the stale reference run)
is a fixed constant that reproduces the identical collision every time.
A single-step guard for this class of collision already existed for the
narrower case of a CronTriggerTimetable-to-CronDataIntervalTimetable
switch. A single step turns out to always be enough for both shipped
_DataIntervalTimetable subclasses, but only because of invariants that
are specific to them and aren't enforced anywhere -- a custom Timetable
isn't guaranteed to uphold them. Retry a bounded number of times instead
of assuming one step suffices, and fail loudly if that budget is
exhausted rather than looping unbounded, which would otherwise hang the
scheduler's main loop for every Dag if a future _get_next implementation
ever stopped strictly advancing.
* Simplify the coarser-schedule-stall guard to a single bounded retry
Only one advance past the previous run's start is provably necessary
for both shipped _DataIntervalTimetable subclasses; a second retry was
unproven margin that only existed to satisfy a synthetic test case, not
any real or documented timetable behavior. A bounded while loop implied
that margin was load-bearing. Replacing it with a single retry followed
by a loud failure keeps the same fail-fast guarantee -- a custom
Timetable needing more than one step is still caught immediately rather
than silently retried -- while matching what the invariant actually
proves.
* Use ValueError for timetable alignment guard
* Avoid exposing timetable internals in error message
* Simplify schedule change test runner helper
* Clarify zero-length interval test wording
* Clarify coarser schedule regression test comment
(cherry picked from commit 31117014f3c5a8cd4d4acd4223309eb344e21981)
Co-authored-by: Jason(Zhe-You) Liu <68...@users.noreply.github.com>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [v3-3-test] Fix Dag scheduling stall after switching to a coarser cron (#72498) [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 merged PR #72679:
URL: https://github.com/apache/airflow/pull/72679
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org