Feat: Dag Runs UI now has multi-select bulk actions (#63854)#64010
Feat: Dag Runs UI now has multi-select bulk actions (#63854)#64010bhumikasudarshani-cmd wants to merge 5 commits intoapache:mainfrom
Conversation
- 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
|
Do you think you can add a screenshot of the UI or a working small video demo? |
There was a problem hiding this comment.
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")} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
All three problems have been resolved:
- The selection composite key is
${run.dag_id}:${run.dag_run_id} - When selecting in bulk, row-level buttons are disabled.
- 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({ |
There was a problem hiding this comment.
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}`|
It will be helpful if you can attach screenshots/video and talk about how you tested this change. |
|
@bhumikasudarshani-cmd This PR has been converted to draft because it does not yet meet our Pull Request quality criteria. Issues found:
What to do next:
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. |
|
Issue related to this PR will be closed soon as another PR was merged for it. We can probably close this Pull request now. |
#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.