You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "pierrejeambrun (via GitHub)" <gi...@apache.org> on 2026/04/24 17:14:29 UTC

[PR] UI: Add Clear All Mapped Tasks button (pickup of #60591) [airflow]

pierrejeambrun opened a new pull request, #65813:
URL: https://github.com/apache/airflow/pull/65813

   Picks up stale PR apache/airflow#60591 by @VedantMadane and addresses outstanding review comments.
   
   Closes #60460.
   
   ## What's included
   
   - **Button on the mapped task instance header** that clears all mapped task instances at once, using the existing backend support for ``task_ids: [taskId]`` (no ``map_index``).
   - Consolidation of the former ``ClearTaskInstance`` / ``ClearAllMappedTaskInstances`` dialogs into a single ``ClearTaskInstanceDialog`` with an ``allMapped`` mode.
   
   ## Review comments addressed (vs. #60591 HEAD)
   
   - **Single PATCH instead of a per-TI loop for note update on allMapped clear.** The backend supports ``map_index=null`` to update all mapped instances at once.
   - **``taskInstance``/``onOpen(ti)`` props removed from ``ClearTaskInstanceButton``.** No caller passed them; the interface is now strictly ``dagId``/``dagRunId``/``mapIndex``/``taskId`` with an optional ``onOpen`` for external-dialog callers.
   - **Group-clearing regression fixed.** ``ClearGroupTaskInstanceDialog`` is restored and ``GroupTaskInstance/Header.tsx`` re-wires the button's ``onOpen`` to render it, so clearing a task-group node still clears every task in the group.
   - **Unrelated changes reverted:** ``package.json`` (typecheck script split) and ``DagsList.test.tsx`` (i18n lookup).
   - **Explicit ``!== undefined`` narrowing** instead of ``Boolean(x)`` + ``x as string`` at the clear-all-mapped button site.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 4.7)
   
   Generated-by: Claude Code (Opus 4.7) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] UI: Add Clear All Mapped Tasks button (pickup of #60591) [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on PR #65813:
URL: https://github.com/apache/airflow/pull/65813#issuecomment-4314994080

   Still need some iteration and more testing from my side.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] UI: Add Clear All Mapped Tasks button [airflow]

Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi merged PR #65813:
URL: https://github.com/apache/airflow/pull/65813


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] UI: Add Clear All Mapped Tasks button (pickup of #60591) [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #65813:
URL: https://github.com/apache/airflow/pull/65813#discussion_r3146673202


##########
airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx:
##########
@@ -355,7 +355,12 @@ export const TaskInstances = () => {
 
   return (
     <>
-      <TaskInstancesFilter />
+      <Flex alignItems="center" justifyContent="space-between">
+        <TaskInstancesFilter />
+        {dagId !== undefined && runId !== undefined && taskId !== undefined ? (
+          <ClearTaskInstanceButton allMapped dagId={dagId} dagRunId={runId} taskId={taskId} />
+        ) : undefined}

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] UI: Add Clear All Mapped Tasks button (pickup of #60591) [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #65813:
URL: https://github.com/apache/airflow/pull/65813#discussion_r3146517763


##########
airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx:
##########
@@ -355,7 +355,12 @@ export const TaskInstances = () => {
 
   return (
     <>
-      <TaskInstancesFilter />
+      <Flex alignItems="center" justifyContent="space-between">
+        <TaskInstancesFilter />
+        {dagId !== undefined && runId !== undefined && taskId !== undefined ? (
+          <ClearTaskInstanceButton allMapped dagId={dagId} dagRunId={runId} taskId={taskId} />
+        ) : undefined}

Review Comment:
   To address



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org