UI: Add bulk Clear on the Dag Runs list page#67564
Open
pierrejeambrun wants to merge 1 commit into
Open
Conversation
028e08b to
469cd0f
Compare
469cd0f to
238dc3d
Compare
Re-introduces collective Clear on the Dag Runs list page — the Airflow 2.x ``DagRunModelView`` action that the Airflow 3 UI did not yet replicate (apache#63854). The button sits next to the bulk Delete shipped in apache#67095 and opens a dialog mirroring the existing single-run Clear: a segmented control (``Clear existing tasks`` / ``Clear only failed tasks`` / ``Queue up new tasks``), an affected-tasks preview grouped by run, and an optional note. No backend change is required — the dialog fans out the existing ``POST /dags/{dag_id}/dagRuns/{dag_run_id}/clear`` endpoint over the selected runs with ``Promise.allSettled``, then patches the note via ``PATCH /dags/{dag_id}/dagRuns/{dag_run_id}`` on the runs that succeeded. Per-run outcomes are surfaced via the partial-failure UX landed in apache#67284: successful rows are deselected, failures stay in the selection and appear as inline errors so the user can retry just the remaining set. Bulk Mark as success / failed on Dag Runs (the other half of apache#63854) is intentionally out of scope here.
238dc3d to
01667c7
Compare
Member
Author
|
Partial success: Screen.Recording.2026-05-27.at.18.55.45.mov |
bbovenzi
approved these changes
May 27, 2026
Contributor
bbovenzi
left a comment
There was a problem hiding this comment.
As a UI-only change, sure.
But we really should upgrade the API to have a real bulk update endpoint.
Additionally, we need to add a note to our clear endpoints to avoid needing a second patch request afterwards.
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.
Re-introduces collective Clear on the Dag Runs list page — the
Airflow 2.x
DagRunModelViewaction that the Airflow 3 UI did notyet replicate. Part of #63854.
Similarly to bulk clear task instances. Each dag run will generate one query. (dry run + non dry run). (TI were grouped per run, for dag run there is no grouping supported).
That will require some rework for scalability on big dags / high number of runs cleared at one. (for now it's limited to 1 page i.e 50 runs)
Screen.Recording.2026-05-27.at.18.21.51.mov
Example with queue up new tasks: (new dag run version)
https://github.com/user-attachments/assets/f8cafff3-29bb-4205-938f-cff0a1342a93
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.7) following the guidelines