jedcunningham commented on code in PR #44464:
URL: https://github.com/apache/airflow/pull/44464#discussion_r1872170049
##########
airflow/api_fastapi/core_api/app.py:
##########
@@ -98,6 +100,41 @@ def init_plugins(app: FastAPI) -> None:
app.mount(url_prefix, subapp)
+def init_flask_plugins(app: FastAPI) -> None:
+ """Integrate Flask plugins (plugins from Airflow 2)."""
+ from airflow import plugins_manager
+
+ plugins_manager.initialize_flask_plugins()
+
+ # If no Airflow 2.x plugin is in the environment, no need to go further
+ if (
+ not plugins_manager.flask_blueprints
+ and not plugins_manager.flask_appbuilder_views
+ and not plugins_manager.flask_appbuilder_menu_links
+ ):
+ return
+
+ from fastapi.middleware.wsgi import WSGIMiddleware
+
+ try:
+ from airflow.providers.fab.www.app import create_app
+ except ImportError:
+ raise AirflowException(
+ "Some Airflow 2 plugins have been detected in your environment. "
+ "To run them with Airflow 3, you must install fab provider in your
Airflow environment."
Review Comment:
```suggestion
"To run them with Airflow 3, you must install the FAB provider
in your Airflow environment."
```
nit
##########
providers/src/airflow/providers/fab/www/templates/swagger-ui/index.j2:
##########
@@ -0,0 +1,87 @@
+{#
Review Comment:
hmm, do we need the swagger ui stuff still? That's only the api reference,
right?
--
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]