You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "nagasrisai (via GitHub)" <gi...@apache.org> on 2026/03/19 10:27:37 UTC

[PR] fix(ui): invalidate task instances list query after clearing task instance [airflow]

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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] fix(ui): invalidate task instances list query after clearing task instance [airflow]

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

   Yes flaky test failure, merging.


-- 
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] fix(ui): invalidate task instances list query after clearing task instance [airflow]

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


-- 
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] fix(ui): invalidate task instances list query after clearing task instance [airflow]

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

   hey @bbovenzi — you spotted the root cause on #60703 so figured you would be the right person to look at this when you get a chance


-- 
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] fix(ui): invalidate task instances list query after clearing task instance [airflow]

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

   The Chromium and WebKit e2e failures look unrelated to this change. 
   
   Chromium is hitting `net::ERR_ABORTED; maybe frame was detached?` during navigation and a `triggerButton` visibility timeout in the dag-tasks test. WebKit is failing with `apiRequestContext.patch: Timeout 10000ms exceeded` inside the `beforeEach` of the dag-calendar-tab tests — that's an API call timing out before the test even runs, not a UI assertion.
   
   Firefox ran the same suite and passed. If the query invalidation change was breaking something, it would show up in Firefox too. These look like intermittent CI timeouts rather than a regression from this PR.


-- 
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