Skip to content

UI: Fix grid columns vanishing when a Dag version has been cleaned - #73514

Closed
Eason09053360 wants to merge 1 commit into
apache:mainfrom
Eason09053360:fix-grid-ti-summaries-missing-serdag
Closed

Eason09053360 wants to merge 1 commit into
apache:mainfrom
Eason09053360:fix-grid-ti-summaries-missing-serdag

Conversation

@Eason09053360

Copy link
Copy Markdown
Contributor

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?
  • Yes — Claude Code (Opus 5)

Generated-by: Claude Code (Opus 5) following the guidelines

`_get_serdag` is declared `SerializedDAG | None` and logs when it returns None,
but the caller guarded it with `if TYPE_CHECKING: assert serdag`, which never
executes at runtime. Once `airflow db clean` removes a version's serialized Dag
row, the resulting AttributeError is raised inside the `StreamingResponse`
generator -- after the 200 has been sent. The client gets a silently truncated
NDJSON body and loses every run queued behind the failing one, with no status
code to detect it by. The guard was a real `raise HTTPException(404)` until
apache#52302 replaced it with the no-op assert.

A 404 is no longer available that far into the stream, and skipping the run
would hide task instances that are still in the database, so an unresolvable
version now falls through to the flat-node path the endpoint already uses for
tasks the current structure no longer contains.

That makes the missing serialized Dag an expected, handled condition, and the
grid re-streams every visible run on each auto-refresh, so its log drops from
error to warning -- matching the existing sites for the same condition in
models/taskinstance.py.
@boring-cyborg boring-cyborg Bot added the area:API Airflow's REST/HTTP API label Sep 22, 2026
This was referenced Sep 25, 2026
@potiuk

potiuk commented Sep 25, 2026

Copy link
Copy Markdown
Member

Hello @Eason09053360 - thank you for your contributions to Apache Airflow!

The Airflow community has introduced a limit of 5 open pull requests at a time for contributors without write access to the repository. You currently have 33 open pull requests, so - as a one-time step of introducing the limit - we closed the ones where maintainers have not engaged yet:

These pull requests stay open because maintainers are already engaged in them - they count towards your limit:

This is not a judgement of you or of your changes. We never told contributors before that opening many pull requests at once was a problem, so there is nothing to feel bad about - and nothing is lost: your branches, commits and the review history stay where they are.

What we ask you to do is to make your first prioritization decision: choose which of the pull requests above matter most to you, and reopen them (up to 5 open at a time, including the ones still open) with the "Reopen pull request" button or gh pr reopen <PR_NUMBER> --repo apache/airflow. Reopen the ones you are ready to follow through - keep them rebased, respond to review comments and fix failing checks.

While your pull requests are waiting for review, the most valuable thing you can do is help in other ways - reviewing other contributors' pull requests, helping with issues, and taking part in the discussions on the devlist and Slack.

Why we introduced the limit, what it means for you and how to reopen or restore a pull request is explained in https://github.com/apache/airflow/blob/main/contributing-docs/32_open_pull_request_limit.rst.


Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting

@potiuk potiuk closed this Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API closed because of open PR limit Closed as a one-time step of introducing the open pull request limit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants