Skip to content

UI: Add bulk pause, drain and unpause actions to the Dags list - #73055

Merged
bbovenzi merged 4 commits into
apache:mainfrom
dheerajturaga:bulk-pause-drain-dags
Sep 26, 2026
Merged

bbovenzi merged 4 commits into
apache:mainfrom
dheerajturaga:bulk-pause-drain-dags

Conversation

@dheerajturaga

@dheerajturaga dheerajturaga commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

Adds bulk scheduling actions to the Dags list table view: select rows with the new checkbox column, then pause/drain or unpause them all at once instead of flipping each Dag's toggle.

  • Pause / Drain: if any selected Dag has unfinished runs, the drain-vs-pause choice is shown a single time for the whole batch instead of once per Dag. Dags that are already paused stay paused whichever option is picked, since draining one would unpause it and let the scheduler resume its unfinished runs.
  • Unpause: sets every selected Dag back to active, which also cancels a drain in progress (the same as clicking a draining Dag's toggle). It always asks for confirmation, because resuming many Dags at once can start a burst of catchup runs.

Each button is disabled when it would change nothing for the current selection.

Follow-up to #72407, which added the draining state and the per-Dag drain-vs-pause choice this PR collapses down to one click for a whole selection.

related: #22006

image image
Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Claude Sonnet 5, Claude Opus 5.5)

Generated-by: Claude Code (Claude Sonnet 5, Claude Opus 5.5) following the guidelines

@dheerajturaga
dheerajturaga force-pushed the bulk-pause-drain-dags branch 3 times, most recently from 3c3cdcd to 5f72066 Compare September 14, 2026 20:35
@dheerajturaga
dheerajturaga marked this pull request as ready for review September 14, 2026 20:36
@dheerajturaga dheerajturaga added this to the Airflow 3.4.0 milestone Sep 15, 2026
@dheerajturaga dheerajturaga mentioned this pull request Sep 15, 2026
1 task done
@dheerajturaga dheerajturaga changed the title Add a bulk pause/drain action to the Dags list UI: Add a bulk pause/drain action to the Dags list Sep 17, 2026
@dheerajturaga
dheerajturaga force-pushed the bulk-pause-drain-dags branch 2 times, most recently from 16feca7 to 2a8cd36 Compare September 24, 2026 20:05
@dheerajturaga

Copy link
Copy Markdown
Member Author

@bbovenzi, it would be great to get your opinion on this. This is needed for drain feature to be feature complete intime for 3.4.0

@dheerajturaga dheerajturaga added the skip newsfragment check Skip the newsfragment PR number check label Sep 24, 2026
Draining a Dag with unfinished runs now asks whether to drain or pause
immediately, which turned stopping many Dags into two clicks per Dag
instead of one. Selecting several Dags in the table view and pausing
or draining them together needs at most one such choice for the whole
batch.

Follow-up to the draining state added in apache#72407.

related: apache#22006
The bulk action in the Dags list is part of the graceful draining feature, so the release note should credit it alongside the core and airflowctl changes.
Draining clears is_paused, so a paused Dag caught up in a bulk drain let
the scheduler resume its unfinished runs until the drain completed, the
opposite of what the user asked for. Such Dags also forced the
drain-vs-pause prompt even when every unpaused Dag in the selection was
idle.
A selection could be paused or drained in one go but had to be resumed
one toggle at a time. Unpausing always asks for confirmation because
resuming many Dags at once can start a burst of catchup runs.
@dheerajturaga

Copy link
Copy Markdown
Member Author

@bbovenzi , I also updated the PR to also unpause the dags aswell. That was missing in my original implementation

@dheerajturaga dheerajturaga changed the title UI: Add a bulk pause/drain action to the Dags list UI: Add bulk pause, drain and unpause actions to the Dags list Sep 25, 2026

@eladkal eladkal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bbovenzi
bbovenzi merged commit 18fe1c6 into apache:main Sep 26, 2026
301 of 303 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Backport failed to create: v3-3-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
❌ v3-3-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 18fe1c6 v3-3-test

This should apply the commit to the v3-3-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

@github-actions

Copy link
Copy Markdown
Contributor

Backport failed to create: airflow-ctl/v0-1-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
❌ airflow-ctl/v0-1-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 18fe1c6 airflow-ctl/v0-1-test

This should apply the commit to the airflow-ctl/v0-1-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants