nagasrisai opened a new pull request, #63923: URL: https://github.com/apache/airflow/pull/63923
### Description After clearing a task instance from the UI (via the Task Instances list page or the task detail page), the list view does not refresh to show the updated state. The cleared task continues to display its old state (e.g. `success` or `failed`) instead of `no_status` / `queued`. ### Root cause `useClearTaskInstances` was missing `[useTaskInstanceServiceGetTaskInstancesKey]` from the list of React Query keys invalidated on success. Both sibling hooks already handle this correctly: - `useClearRun` — invalidates `[useTaskInstanceServiceGetTaskInstancesKey]` ✅ - `usePatchTaskInstance` — invalidates `[useTaskInstanceServiceGetTaskInstancesKey]` ✅ - `useClearTaskInstances` — was missing it ❌ ### Fix Added `useTaskInstanceServiceGetTaskInstancesKey` to the imports and to the `queryKeys` array in `useClearTaskInstances.ts`, matching the pattern used by `useClearRun` and `usePatchTaskInstance`. ### Testing After the fix, clearing a task instance from the TaskInstances list page immediately refreshes the list to show the new state (`no_status`) without requiring a manual page reload. Closes #60703 --- ### Checklist - [x] My PR is limited to one change/feature/bugfix - [x] My changes are tested - [x] My changes have an associated changelog fragment - [x] I have updated relevant documentation -- 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]
