Skip to content

Feat: Dag Runs UI now has multi-select bulk actions (#63854)#64010

Open
bhumikasudarshani-cmd wants to merge 5 commits intoapache:mainfrom
bhumikasudarshani-cmd:feature/bulk-dag-run-actions-clean
Open

Feat: Dag Runs UI now has multi-select bulk actions (#63854)#64010
bhumikasudarshani-cmd wants to merge 5 commits intoapache:mainfrom
bhumikasudarshani-cmd:feature/bulk-dag-run-actions-clean

Conversation

@bhumikasudarshani-cmd
Copy link

@bhumikasudarshani-cmd bhumikasudarshani-cmd commented Mar 20, 2026

#63854
closes the feature gap between Airflow 2 and Airflow 3 by bringing back multi-select bulk action functionality in the Dag Runs UI.

Users could choose several dag runs and carry out bulk actions in Airflow 2. In Airflow 3, this feature was not present.

The Dag Runs table now has a checkbox column.The header now has a select-all checkbox.

  • Added a floating ActionBar with buttons for Mark Success, Mark Failed, and Clear.When at least one row is selected, an ActionBar appears.
  • Adheres to the current Variables page multi-select pattern

- Add checkbox column to DagRuns table
- Add select-all/deselect-all header checkbox
- Add floating ActionBar with Clear/Mark Success/Mark Failed
- Follows existing Variables page multi-select pattern

Closes apache#63854
@shivaam
Copy link
Contributor

shivaam commented Mar 21, 2026

Do you think you can add a screenshot of the UI or a working small video demo?

Copy link
Contributor

@shivaam shivaam left a comment

Choose a reason for hiding this comment

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

Row-level action buttons not disabled during selection (Medium)

In Variables.tsx (lines 133-134) and Connections.tsx (lines 126-127), individual row action buttons receive disabled={selectedRows.size > 0} to prevent confusing interactions when bulk mode is active. The ClearRunButton, MarkRunAsButton, and DeleteRunButton in the actions column (unchanged lines ~217-230) remain fully clickable during selection. This is a one-line fix per button to align with the established pattern:

<ClearRunButton dagRun={row.original} disabled={selectedRows.size > 0} />
<MarkRunAsButton dagRun={row.original} disabled={selectedRows.size > 0} />
<DeleteRunButton dagRun={row.original} disabled={selectedRows.size > 0} />

Note: this requires passing selectedRows into the runColumns function's scope — which naturally aligns with how Variables/Connections pass it via GetColumnsParams.

No backend bulk API for DAG runs (Medium)

There's no bulk endpoint in dag_run.py for bulk clear/mark/delete. Variables and Connections have dedicated bulk PATCH endpoints backed by BulkService, but looping through individual API calls (patchDagRun, clearDagRun, deleteDagRun) from the UI is also a valid approach. Either way, this needs to be wired up when the action buttons are added.

<ActionBar.Root closeOnInteractOutside={false} open={Boolean(selectedRows.size)}>
<ActionBar.Content>
<ActionBar.SelectionTrigger>
{selectedRows.size} {translate("common:selected")}
Copy link
Contributor

Choose a reason for hiding this comment

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

ActionBar has no action buttons (Critical)

The ActionBar currently shows only a selection count and close trigger — no actual action buttons (Clear, Mark Success, Mark Failed, Delete). Compare with Variables.tsx lines 239-241 which places DeleteVariablesButton between ActionBar.Separator and ActionBar.CloseTrigger. Without action buttons, the checkbox selection has no purpose.

Is this intentional as a first step with buttons coming in a follow-up PR? If so, please mention that in the PR description.

Choose a reason for hiding this comment

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

All three problems have been resolved:

  1. The selection composite key is ${run.dag_id}:${run.dag_run_id}
  2. When selecting in bulk, row-level buttons are disabled.
  3. ActionBar now has buttons for Mark As and Clear.

I appreciate the thorough review.


const columns = runColumns(translate, dagId);
const { allRowsSelected, clearSelections, handleRowSelect, handleSelectAll, selectedRows } =
useRowSelection({
Copy link
Contributor

Choose a reason for hiding this comment

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

Selection key collision on global DAG Runs page (Medium)

dag_run_id is unique only within a DAG — the DB has a UniqueConstraint("dag_id", "run_id"), not on run_id alone. On the global DAG Runs page (where dagId is ~), two DAGs can share the same dag_run_id (e.g., scheduled__2024-01-01T00:00:00+00:00), causing them to collide in the selection Map.

The key must be composite:

getKey: (run) => `${run.dag_id}:${run.dag_run_id}`

@shivaam
Copy link
Contributor

shivaam commented Mar 21, 2026

It will be helpful if you can attach screenshots/video and talk about how you tested this change.

@potiuk potiuk marked this pull request as draft March 23, 2026 17:20
@potiuk
Copy link
Member

potiuk commented Mar 23, 2026

@bhumikasudarshani-cmd This PR has been converted to draft because it does not yet meet our Pull Request quality criteria.

Issues found:

  • Pre-commit / static checks: Failing: CI image checks / Static checks. Run prek run --from-ref main locally to find and fix issues. See Pre-commit / static checks docs.
  • Other failing CI checks: Failing: Basic tests / React UI tests. Run prek run --from-ref main locally to reproduce. See static checks docs.

Note: Your branch is 85 commits behind main. Some check failures may be caused by changes in the base branch rather than by your PR. Please rebase your branch and push again to get up-to-date CI results.

What to do next:

  • The comment informs you what you need to do.
  • Fix each issue, then mark the PR as "Ready for review" in the GitHub UI - but only after making sure that all the issues are fixed.
  • There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates.
  • Maintainers will then proceed with a normal review.

Converting a PR to draft is not a rejection — it is an invitation to bring the PR up to the project's standards so that maintainer review time is spent productively. There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the Airflow Slack.

@shivaam
Copy link
Contributor

shivaam commented Mar 27, 2026

Issue related to this PR will be closed soon as another PR was merged for it. We can probably close this Pull request now.

@bhumikasudarshani-cmd bhumikasudarshani-cmd marked this pull request as ready for review March 27, 2026 06:17
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.

3 participants