You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jobs@airflow.apache.org by GitBox <gi...@apache.org> on 2026/07/05 18:54:32 UTC

[GH] (airflow/2605/ti_heartbeat_async): Workflow run "Tests (AMD)" failed!

The GitHub Actions job "Tests (AMD)" on airflow.git/2605/ti_heartbeat_async has failed.
Run started by GitHub user Dev-iL (triggered by Dev-iL).

Head commit for run:
d523f0ae7b615ae4bcee521b08344939bd2048f1 / Dev-iL <65...@users.noreply.github.com>
Use async DB session for Execution API task-instance heartbeat

Convert ti_heartbeat from the synchronous SessionDep to the async AsyncSessionDep, adopting the async metadata engine that already ships in Airflow 3.x. The route's behavior is unchanged: same 204/404/409/410 responses, same fast-path UPDATE / SELECT ... FOR UPDATE fallback, same last_heartbeat_at semantics, no version bump.

Make AsyncSessionDep function-scoped so the async session commits before the response is sent, matching the synchronous SessionDep. FastAPI's default "request" scope for yield-dependencies commits after the response is sent, so a failed commit would roll back after the worker already received a 204 success. A regression test forces a commit failure and asserts the route surfaces an error rather than a silent 204.

Heartbeat's async writes exposed a test-harness issue on Postgres: the async engine binds its connection pool to the event loop that created it, while the test harness builds a fresh app and loop per test, so a pooled connection from a prior test's closed loop was reused. Add a reconfigure_async_db_engine autouse fixture to the heartbeat tests that rebuilds the async session per test, mirroring the existing workaround in TestWaitDagRun.

Document the asyncpg + transaction-mode pgbouncer prepared-statement caveat in the sql_alchemy_connect_args_async config reference and the PGBouncer setup guide (set statement_cache_size=0 and prepared_statement_cache_size=0); switching the default async driver to psycopg3 is tracked separately.

Report URL: https://github.com/apache/airflow/actions/runs/28749497984

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: jobs-unsubscribe@airflow.apache.org
For additional commands, e-mail: jobs-help@airflow.apache.org