This is an automated email from the ASF dual-hosted git repository.
mobuchowski pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 2b082e670a9 fix: Re-add configuring orm for OpenLineage's listener on
scheduler (#48049)
2b082e670a9 is described below
commit 2b082e670a9689edfd734cd8b3296d62170c62ed
Author: Kacper Muda <[email protected]>
AuthorDate: Fri Mar 21 12:31:17 2025 +0100
fix: Re-add configuring orm for OpenLineage's listener on scheduler (#48049)
---
.../src/airflow/providers/openlineage/plugins/listener.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
a/providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py
b/providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py
index b46c65de64a..1860da211b2 100644
---
a/providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py
+++
b/providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py
@@ -69,15 +69,16 @@ def _get_try_number_success(val):
def _executor_initializer():
"""
- Initialize worker processes for the executor used for DagRun listener.
+ Initialize processes for the executor used with DAGRun listener's methods
(on scheduler).
This function must be picklable, so it cannot be defined as an inner
method or local function.
Reconfigures the ORM engine to prevent issues that arise when multiple
processes interact with
the Airflow database.
"""
- if not AIRFLOW_V_3_0_PLUS:
- settings.configure_orm()
+ # This initializer is used only on the scheduler
+ # We can configure_orm regardless of the Airflow version, as DB access is
always allowed from scheduler.
+ settings.configure_orm()
class OpenLineageListener: