Skip to content

UI: Add bulk Clear on the Dag Runs list page#67564

Open
pierrejeambrun wants to merge 1 commit into
apache:mainfrom
astronomer:feat/bulk-clear-dag-runs
Open

UI: Add bulk Clear on the Dag Runs list page#67564
pierrejeambrun wants to merge 1 commit into
apache:mainfrom
astronomer:feat/bulk-clear-dag-runs

Conversation

@pierrejeambrun
Copy link
Copy Markdown
Member

@pierrejeambrun pierrejeambrun commented May 26, 2026

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. 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?
  • Yes — Claude Code (Opus 4.7)

Generated-by: Claude Code (Opus 4.7) following the guidelines

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label May 26, 2026
@pierrejeambrun pierrejeambrun force-pushed the feat/bulk-clear-dag-runs branch from 028e08b to 469cd0f Compare May 27, 2026 08:45
@pierrejeambrun pierrejeambrun marked this pull request as ready for review May 27, 2026 16:28
@pierrejeambrun pierrejeambrun force-pushed the feat/bulk-clear-dag-runs branch from 469cd0f to 238dc3d Compare May 27, 2026 16:29
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.
@pierrejeambrun pierrejeambrun force-pushed the feat/bulk-clear-dag-runs branch from 238dc3d to 01667c7 Compare May 27, 2026 16:54
@pierrejeambrun
Copy link
Copy Markdown
Member Author

Partial success:

Screen.Recording.2026-05-27.at.18.55.45.mov

Copy link
Copy Markdown
Contributor

@bbovenzi bbovenzi left a comment

Choose a reason for hiding this comment

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

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.

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

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants