neochaotic opened a new issue, #67884:
URL: https://github.com/apache/airflow/issues/67884
### Under which category would you file this issue?
Airflow Core
### Apache Airflow version
main (commit 707e316881, post-3.2.2)
### What happened and how to reproduce it?
After marking a task instance as failed/success, the UI becomes
unresponsive — buttons and links stop reacting to clicks. The state badge
itself updates correctly (this part was fixed by #67212), but the page
freezes for several seconds and a hard refresh is needed to recover.
DevTools Network shows **3 back-to-back `GET /ui/grid/ti_summaries/...`
NDJSON stream calls** triggered by the new cache-subscriber watcher in
`useGridTISummaries.ts`. Each stream re-runs `setSummariesByRunId(...)`
once per emitted line (~14 lines per stream), producing ~42 React state
updates in quick succession on top of an already-busy page render —
which matches the user-observed freeze.
**Steps to reproduce**
1. Run `airflow standalone` from `main` HEAD with examples enabled.
2. Trigger any DAG (e.g. `tutorial_dag`) and let a task finish.
3. Open the Task Instance page.
4. Open DevTools → Network → filter Fetch/XHR.
5. Click the `✓/✗` menu → mark as **failed** → confirm.
6. Observe: 3 `tutorial_dag?run_ids=...` (initiator
`useGridTISummariesStream`) fire. Page becomes unclickable for ~3-5s.
### What you think should happen instead?
The watcher should debounce all mutation-driven invalidations into a
single re-stream, the same way it already attempts via `clearTimeout` /
`setTimeout(..., 0)`. The page should remain responsive after the mark.
### What I have verified
- Reproduces on a clean checkout of `main` HEAD (707e316881), no source
modifications, vanilla `pnpm dev` against `apache/airflow:3.2.2`
standalone as backend (proxied via vite).
- Network panel confirms 3 stream fetches per mark action, not 1.
- Suspect site:
`airflow-core/src/airflow/ui/src/queries/useGridTISummaries.ts` lines
140-165 — the cache-subscriber watcher added in #67212.
- `usePatchTaskInstance.onSuccessFn` invalidates several watched keys
inside a `Promise.all`. Each invalidation queues a microtask;
`setTimeout(..., 0)` runs in a separate macrotask, so the `clearTimeout`
debounce may not coalesce when the invalidation events span more than
one microtask cycle.
### Operating System
macOS 15.5
### Apache Airflow Provider(s)
n/a
### Versions of Apache Airflow Providers
n/a
### Deployment
Other Docker-based deployment
### Deployment details
`apache/airflow:3.2.2` for backend; UI served from `pnpm dev` on `main`
HEAD with vite proxy to the standalone container.
### Anything else?
- Likely a regression introduced by #67212 (`Improve query validation,
including for streaming`, merged 2026-05-20).
- The original "state badge stays stale" bug from #67883 IS fixed by
#67212 — this issue tracks the new freeze symptom that appeared
alongside it.
- A heavier debounce (e.g. 50–100 ms instead of 0 ms) or batching the
invalidations inside the mutation hook would probably help, but the
right fix depends on whether the maintainers prefer a tighter
watcher contract or a different aggregation point.
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
--
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]