kaxil commented on code in PR #48049:
URL: https://github.com/apache/airflow/pull/48049#discussion_r2007448114
##########
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()
Review Comment:
I see the following error in @ashb 's PR:
```
/usr/local/lib/python3.12/site-packages/airflow/providers/openlineage/plugins/listener.py:244
in on_task_instance_success
/usr/local/lib/python3.12/site-packages/airflow/providers/openlineage/plugins/listener.py:326
in _on_task_instance_success
/usr/local/lib/python3.12/site-packages/airflow/providers/openlineage/plugins/listener.py:452
in _execute
/usr/local/lib/python3.12/site-packages/airflow/providers/openlineage/plugins/listener.py:484
in _fork_execute
/usr/local/lib/python3.12/site-packages/airflow/settings.py:363 in
configure_orm
<string>:2 in create_engine
/usr/local/lib/python3.12/site-packages/sqlalchemy/util/deprecations.py:375
in warned
/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/create.py:514 in
create_engine
/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/url.py:738 in
make_url
/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/url.py:799 in
_parse_url
```
--
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]