Dev-iL commented on PR #73414:
URL: https://github.com/apache/airflow/pull/73414#issuecomment-5993732981

   You're right: main already has the API lifespan cleanup from #73838 and an 
Execution API `async_db_engine` fixture. I've corrected the stale description 
and reused that cleanup.
   
   The remaining case is the in-process API used by the Dag processor and 
triggerer tests. Async reads exposed pooled connections opened on another 
test's loop. The focused `in_process_execution_api` fixture gives these tests a 
fresh engine and uses `TestClient` to own the private app's lifespan and loop. 
Its synchronous transport uses that loop; the captured engine is disposed 
before the loop stops, and the previous globals are restored even if setup or 
cleanup fails: [in-process 
fixture](https://github.com/apache/airflow/blob/d69564c1a62fa51ad0d3a3450ede7aaed9c9750f/airflow-core/tests/conftest.py).
   
   Regression tests cover delayed transport collection, a populated previous 
pool remaining intact and usable, startup and shutdown failures, disposal 
failure, and partial setup. The direct async fixture also restores its globals 
on failure. Locally, 136 focused tests passed on each of SQLite, PostgreSQL and 
MySQL. Another 130 GET contract cases passed per backend across all ten 
supported API versions. Remote CI for revised head `d69564c1a6` is pending.
   
   I dropped the earlier separate production-ownership design after finding no 
production counterexample to the existing loop ownership. This PR targets main 
directly and keeps the existing production session and engine infrastructure.
   
   ---
   Drafted-by: Codex (GPT-6) (no human review before posting)
   


-- 
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