aaron-y-chen opened a new pull request, #76493:
URL: https://github.com/apache/airflow/pull/76493
related: #76425
`requires_access_backfill` is an async dependency, but it looked up the
backfill's Dag through the route's sync session, and on a team-name cache miss
it also looked up the Dag's team through the sync `DagModel.get_team_name`.
Both calls waited for a pooled connection on the event loop, so once the pool
was busy they could stall the whole API server in the same way as #76417. Every
`/backfills/{backfill_id}` route ran the first lookup on every request. The
team lookup also ran on routes that name the Dag in the query string or the
body (`GET /backfills?dag_id=`, `GET /ui/backfills?dag_id=`, `POST /backfills`,
`POST /backfills/dry_run`). The sweep in #76424 doesn't reach those routes
because it sends no `dag_id`, so the new route tests seed a backfill and cover
both cases.
Both lookups now run on an async session. `DagModel.get_team_name_async`
shares the existing team-name cache with `get_team_name`, so a value cached by
one is served to the other.
This builds on #76424: it removes the backfill lines from
`generated/known_sync_db_on_event_loop.txt` and uses that PR's
`event_loop_queries` fixture. Until #76424 is merged, the first commit here is
a copy of it, so please review only the last commit. I'll drop that copy and
rebase onto `main` once #76424 is merged.
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Generated-by: Claude Code (Opus 5.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]