Eason09053360 opened a new pull request, #73514: URL: https://github.com/apache/airflow/pull/73514
## Why `_get_serdag` returns `SerializedDAG | None`, but the caller guarded it with `if TYPE_CHECKING: assert serdag`, which never runs. After `airflow db clean` removes a version's serialized Dag row, the `AttributeError` fires inside the `StreamingResponse` generator once the 200 is already sent: the client gets a silently truncated NDJSON body and loses every run queued behind the failing one. This was a real `raise HTTPException(404)` until #52302. ## What - `routes/ui/grid.py`: an unresolvable version now falls through to the flat-node path already used for tasks missing from the current structure. A 404 is no longer possible mid-stream, and skipping the run would hide task instances that still exist. - That log drops from `error` to `warning`, matching `models/taskinstance.py`. It still fires per affected run per auto-refresh — happy to dedupe per request if preferred. - Two tests in `test_grid.py`; both fail without the fix. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 5) Generated-by: Claude Code (Opus 5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
