This is an automated email from the ASF dual-hosted git repository.

pierrejeambrun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new f47038e9efb fix(ui): invalidate task instances list query after 
clearing task instance (#63923)
f47038e9efb is described below

commit f47038e9efb4aa1a193314b2df4c5f0c652be9d9
Author: nagasrisai <[email protected]>
AuthorDate: Mon Mar 30 20:55:10 2026 +0530

    fix(ui): invalidate task instances list query after clearing task instance 
(#63923)
    
    After clearing a task instance, the TaskInstances list page was not
    refreshing to show the updated state. This was because 
`useClearTaskInstances`
    was missing `[useTaskInstanceServiceGetTaskInstancesKey]` in the list of
    query keys to invalidate on success.
    
    Both `useClearRun` and `usePatchTaskInstance` correctly invalidate this
    query — this change brings `useClearTaskInstances` in line with them.
    
    Fixes: #60703
---
 airflow-core/src/airflow/ui/src/queries/useClearTaskInstances.ts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/airflow-core/src/airflow/ui/src/queries/useClearTaskInstances.ts 
b/airflow-core/src/airflow/ui/src/queries/useClearTaskInstances.ts
index b02cc1bbac6..2d70c49bc5b 100644
--- a/airflow-core/src/airflow/ui/src/queries/useClearTaskInstances.ts
+++ b/airflow-core/src/airflow/ui/src/queries/useClearTaskInstances.ts
@@ -24,6 +24,7 @@ import {
   useDagRunServiceGetDagRunsKey,
   UseGanttServiceGetGanttDataKeyFn,
   UseTaskInstanceServiceGetMappedTaskInstanceKeyFn,
+  useTaskInstanceServiceGetTaskInstancesKey,
   useTaskInstanceServicePostClearTaskInstances,
 } from "openapi/queries";
 import type { ApiError } from "openapi/requests";
@@ -114,6 +115,7 @@ export const useClearTaskInstances = ({
       ...taskInstanceKeys,
       UseDagRunServiceGetDagRunKeyFn({ dagId, dagRunId }),
       [useDagRunServiceGetDagRunsKey],
+      [useTaskInstanceServiceGetTaskInstancesKey],
       [useClearTaskInstancesDryRunKey, dagId],
       [usePatchTaskInstanceDryRunKey, dagId, dagRunId],
       UseGanttServiceGetGanttDataKeyFn({ dagId, runId: dagRunId }),

Reply via email to