tirkarthi commented on code in PR #45977:
URL: https://github.com/apache/airflow/pull/45977#discussion_r1934956471


##########
airflow/ui/src/queries/usePatchDagRun.ts:
##########
@@ -45,7 +46,11 @@ export const usePatchDagRun = ({
   const queryClient = useQueryClient();
 
   const onSuccessFn = async () => {
-    const queryKeys = [UseDagRunServiceGetDagRunKeyFn({ dagId, dagRunId }), 
[useDagRunServiceGetDagRunsKey]];
+    const queryKeys = [
+      UseDagRunServiceGetDagRunKeyFn({ dagId, dagRunId }),
+      [useDagRunServiceGetDagRunsKey],
+      [useTaskInstanceServiceGetTaskInstancesKey],

Review Comment:
   I have used below which clears the task instance only related to the dag and 
dagrun. I also found during testing marking a running dag as failed/success 
marks the running tasks as skipped/success and the clear dag run API needs to 
be invalidated. This rebases and complements #46238
   
   ```
        [useTaskInstanceServiceGetTaskInstancesKey, { dagId, dagRunId }],
        [useClearDagRunDryRunKey, dagId],
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to