uranusjr commented on code in PR #30119:
URL: https://github.com/apache/airflow/pull/30119#discussion_r1136918022


##########
airflow/utils/db.py:
##########
@@ -713,8 +713,8 @@ def initdb(session: Session = NEW_SESSION, 
load_connections: bool = True):
     if conf.getboolean("database", "LOAD_DEFAULT_CONNECTIONS") and 
load_connections:
         create_default_connections(session=session)
     # Add default pool & sync log_template
-    add_default_pool_if_not_exists()
-    synchronize_log_template()
+    add_default_pool_if_not_exists(session=session)
+    synchronize_log_template(session=session)

Review Comment:
   Not strictly related, but it seems like a good idea to reuse the session 
here. `upgradedb` already does the same.



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