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

potiuk 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 54634ea47ee Fix duplicated SQLAlchemy sessions caused transactions 
fail to close (#58196)
54634ea47ee is described below

commit 54634ea47ee116fc7d4d766d2a9bbd8f1d2895c9
Author: Simon Meng <[email protected]>
AuthorDate: Wed Nov 12 18:48:35 2025 +0800

    Fix duplicated SQLAlchemy sessions caused transactions fail to close 
(#58196)
---
 providers/fab/src/airflow/providers/fab/www/app.py | 9 +++++++--
 providers/fab/www-hash.txt                         | 2 +-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/providers/fab/src/airflow/providers/fab/www/app.py 
b/providers/fab/src/airflow/providers/fab/www/app.py
index e12fd064c09..06e5285bdac 100644
--- a/providers/fab/src/airflow/providers/fab/www/app.py
+++ b/providers/fab/src/airflow/providers/fab/www/app.py
@@ -30,7 +30,7 @@ from airflow.api_fastapi.app import get_auth_manager
 from airflow.configuration import conf
 from airflow.exceptions import AirflowConfigException
 from airflow.logging_config import configure_logging
-from airflow.providers.fab.www.extensions.init_appbuilder import 
init_appbuilder
+from airflow.providers.fab.www.extensions.init_appbuilder import 
AirflowAppBuilder
 from airflow.providers.fab.www.extensions.init_jinja_globals import 
init_jinja_globals
 from airflow.providers.fab.www.extensions.init_manifest_files import 
configure_manifest_files
 from airflow.providers.fab.www.extensions.init_security import init_api_auth
@@ -94,7 +94,12 @@ def create_app(enable_plugins: bool):
     init_api_auth(flask_app)
 
     with flask_app.app_context():
-        init_appbuilder(flask_app, enable_plugins=enable_plugins)
+        AirflowAppBuilder(
+            app=flask_app,
+            session=db.session,
+            base_template="airflow/main.html",
+            enable_plugins=enable_plugins,
+        )
         init_error_handlers(flask_app)
         # In two scenarios a Flask application can be created:
         # - To support Airflow 2 plugins relying on Flask (``enable_plugins`` 
is True)
diff --git a/providers/fab/www-hash.txt b/providers/fab/www-hash.txt
index 418e86c7dda..47ac6b43c6c 100644
--- a/providers/fab/www-hash.txt
+++ b/providers/fab/www-hash.txt
@@ -1 +1 @@
-c45890ac6b17386adfb076a4baec17589a26aab189d6257a92138aaa720fbc7f
+cc109e95a25c1bb018a85a6a40859234398d5a9ac5bf317197eed3e3ece64b0d

Reply via email to