Andrushika opened a new pull request, #76515:
URL: https://github.com/apache/airflow/pull/76515
related: #76425
## Why
With `[core] multi_team = True`, the pool, connection and variable routes
check access in async dependencies, through `_collect_teams_to_check`. It reads
the team of the existing resource, and checks that a `team_name` in the request
body exists. Both lookups used a sync session, so they waited for a pooled
connection on the event loop. Once the pool is busy, this stalls the whole API
server, like #76417.
## What
Both lookups now run on an async session, through new async variants of the
`get_team_name` helpers and of `Team.get_name_if_exists`. This removes the nine
pool, connection and variable lines from
`generated/known_sync_db_on_event_loop.txt`. The sweep sends `{}` as the body,
so a new test posts a `team_name` to each create route and checks that no sync
SQL runs on the event loop. It fails for all three routes without the change.
This builds on #76424 and uses its `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 the 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)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]