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/02/27 22:45:47 UTC
[GH] (airflow/fix/cache-dbapihook-inspector): Workflow run "Tests" is working again!
The GitHub Actions job "Tests" on airflow.git/fix/cache-dbapihook-inspector has succeeded.
Run started by GitHub user kaxil (triggered by kaxil).
Head commit for run:
f57814fd7cc085d4f76a84cf1ef2307d437498d9 / Kaxil Naik <ka...@gmail.com>
Cache DbApiHook.inspector to avoid creating N engines
DbApiHook.inspector was a @property that called
get_sqlalchemy_engine() on every access. Each call creates a new
SQLAlchemy engine with its own connection pool. When inspecting
multiple tables (e.g., GenericTransfer, SQLColumnCheckOperator),
this created N engines instead of reusing one.
Change @property to @cached_property so the inspector (and its
underlying engine) is created once per hook instance. The hook is
scoped to a single task execution, so the cache lifetime is
appropriate. Update the .pyi stub to match.
Report URL: https://github.com/apache/airflow/actions/runs/22505140674
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