vincbeck commented on code in PR #56982:
URL: https://github.com/apache/airflow/pull/56982#discussion_r2451908223


##########
airflow-core/src/airflow/utils/sqlalchemy.py:
##########
@@ -355,12 +356,14 @@ def with_row_locks(
     :param kwargs: Extra kwargs to pass to with_for_update (of, nowait, 
skip_locked, etc)
     :return: updated query
     """
+    if session.bind is None:

Review Comment:
   Same



##########
airflow-core/src/airflow/utils/db.py:
##########
@@ -1346,7 +1346,11 @@ def create_global_lock(
     lock_timeout: int = 1800,
 ) -> Generator[None, None, None]:
     """Contextmanager that will create and teardown a global db lock."""
-    conn = session.get_bind().connect()
+    bind = session.get_bind()

Review Comment:
   Maybe you can use https://github.com/apache/airflow/pull/56941 to get the 
dialect?



-- 
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]

Reply via email to