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

bbovenzi pushed a commit to branch remove-legacy-ui
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 7fb78691b5534105427aeced77c65a35e122cd42
Author: Ash Berlin-Taylor <[email protected]>
AuthorDate: Wed Feb 19 17:10:34 2025 +0000

    fixup! First run at deleting the legacy UI and webserver
---
 tests_common/test_utils/db.py | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/tests_common/test_utils/db.py b/tests_common/test_utils/db.py
index 58ad46372d7..dbed341afb9 100644
--- a/tests_common/test_utils/db.py
+++ b/tests_common/test_utils/db.py
@@ -85,7 +85,6 @@ def initial_db_init():
 
     from airflow.configuration import conf
     from airflow.utils import db
-    from airflow.www.extensions.init_appbuilder import init_appbuilder
 
     from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS
 
@@ -93,18 +92,18 @@ def initial_db_init():
     if AIRFLOW_V_3_0_PLUS:
         db.downgrade(to_revision="5f2621c13b39")
         db.upgradedb(to_revision="head")
-    _bootstrap_dagbag()
-    # minimal app to add roles
-    flask_app = Flask(__name__)
-    flask_app.config["SQLALCHEMY_DATABASE_URI"] = conf.get("database", 
"SQL_ALCHEMY_CONN")
-    init_appbuilder(flask_app)
-
-    if AIRFLOW_V_3_0_PLUS:
-        from airflow.api_fastapi.app import get_auth_manager
     else:
+        from airflow.www.extensions.init_appbuilder import init_appbuilder
         from airflow.www.extensions.init_auth_manager import get_auth_manager
 
-    get_auth_manager().init()
+        # minimal app to add roles
+        flask_app = Flask(__name__)
+        flask_app.config["SQLALCHEMY_DATABASE_URI"] = conf.get("database", 
"SQL_ALCHEMY_CONN")
+        init_appbuilder(flask_app)
+
+        get_auth_manager().init()
+
+    _bootstrap_dagbag()
 
 
 def parse_and_sync_to_db(folder: Path | str, include_examples: bool = False):

Reply via email to