Fix autorefresh for deadlines and paused dags#67249
Merged
Merged
Conversation
useRefreshOnNewDagRuns was polling every 5 s indefinitely whenever hasPendingRuns was false, including on Dags that are paused and have no active runs. Pass isPaused from the Dag details into the hook and skip the refetchInterval when the Dag is paused and idle.
useDeadlines was polling at full rate on any non-paused Dag, even with no active runs. Pass checkPendingRuns: true to useAutoRefresh so the deadline query pauses when idle and resumes automatically when a new run starts.
If the Dag has no deadline alerts configured, there can never be any deadline instances. Fetch the alert config first (one-shot) and gate the useDeadlines query on total_entries > 0, avoiding the polling request entirely for the common case.
Contributor
Backport failed to create: v3-2-test. View the failure log Run detailsNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
You can attempt to backport this manually by running: cherry_picker 3047ad7 v3-2-testThis should apply the commit to the v3-2-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continueIf you don't have cherry-picker installed, see the installation guide. |
Merged
1 task
bbovenzi
added a commit
that referenced
this pull request
May 20, 2026
…active runs (#67249) (#67256) useRefreshOnNewDagRuns was polling every 5 s indefinitely whenever hasPendingRuns was false, including on Dags that are paused and have no active runs. Pass isPaused from the Dag details into the hook and skip the refetchInterval when the Dag is paused and idle. Note: backport applies only the paused-Dag polling fix from #67249. The deadline-related changes are skipped because the deadline-alerts feature is not present in v3-2-test. (cherry picked from commit 3047ad7) Co-authored-by: Brent Bovenzi <brent@astronomer.io>
vatsrahul1001
pushed a commit
that referenced
this pull request
May 21, 2026
…active runs (#67249) (#67256) useRefreshOnNewDagRuns was polling every 5 s indefinitely whenever hasPendingRuns was false, including on Dags that are paused and have no active runs. Pass isPaused from the Dag details into the hook and skip the refetchInterval when the Dag is paused and idle. Note: backport applies only the paused-Dag polling fix from #67249. The deadline-related changes are skipped because the deadline-alerts feature is not present in v3-2-test. (cherry picked from commit 3047ad7) Co-authored-by: Brent Bovenzi <brent@astronomer.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Was generative AI tooling used to co-author this PR?
Clause Sonnet 4.6
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.