jason810496 opened a new pull request, #76424:
URL: https://github.com/apache/airflow/pull/76424

   - related: #76417
   - **Depends on https://github.com/apache/airflow/pull/76416 get merged 
first** (only the last commit is new here).
   - **Diff for early review**: 
https://github.com/jason810496/airflow/compare/fix/api/audit-log-async-session...ci/api/no-sync-db-on-event-loop
   
   ## Why
   
   A sync DB call in an `async def` dependency blocks the API server event 
loop, so the connections held by sync endpoints are never released. That 
stalled 3.4.0rc2 under concurrent writes (#76417).
   
   Nothing in the test suite caught it, and the same pattern exists on other 
routes.
   
   ## How
   
   - `TestNoSyncDbOnEventLoop` sends one request to every core API and UI 
route, in single-team and multi-team mode. It fails when a sync statement runs 
on the event-loop thread.
   - `TestNoThreadpoolOffload` scans `api_fastapi` and fails on any new 
`run_in_threadpool`, `to_thread.run_sync`, `asyncio.to_thread` or 
`run_in_executor` call. The two auth manager calls stay allowed, because that 
interface is sync.
   - Known offenders are listed in `generated/`. Each line is a strict xfail, 
so a fix fails the run until its line is deleted:
   
   ---
   
   ##### 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]

Reply via email to