This is an automated email from the ASF dual-hosted git repository.

ash 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 eb18f87f091 Stop trying to reconfigure the ORM in the OpenLineage 
workers (#47580)
eb18f87f091 is described below

commit eb18f87f091116a9b7db5ae30fdb40f6e0a6377f
Author: Ash Berlin-Taylor <[email protected]>
AuthorDate: Mon Mar 10 18:25:55 2025 +0000

    Stop trying to reconfigure the ORM in the OpenLineage workers (#47580)
    
    The error was "ArgumentError: Could not parse SQLAlchemy URL from string 
'airflow-db-not-allowed:///'"
    
    from this
    ```
    
/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
    ```
---
 .../src/airflow/providers/openlineage/plugins/listener.py           | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py 
b/providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py
index 7ddd0a7ec7e..3af06538ce7 100644
--- 
a/providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py
+++ 
b/providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py
@@ -76,7 +76,8 @@ def _executor_initializer():
     Reconfigures the ORM engine to prevent issues that arise when multiple 
processes interact with
     the Airflow database.
     """
-    settings.configure_orm()
+    if not AIRFLOW_V_3_0_PLUS:
+        settings.configure_orm()
 
 
 class OpenLineageListener:
@@ -481,7 +482,8 @@ class OpenLineageListener:
             self.log.debug("Process with pid %s finished - parent", pid)
         else:
             setproctitle(getproctitle() + " - OpenLineage - " + callable_name)
-            configure_orm(disable_connection_pool=True)
+            if not AIRFLOW_V_3_0_PLUS:
+                configure_orm(disable_connection_pool=True)
             self.log.debug("Executing OpenLineage process - %s - pid %s", 
callable_name, os.getpid())
             callable()
             self.log.debug("Process with current pid finishes after %s", 
callable_name)

Reply via email to