-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Description
Body
Initially reported in Slack
Hi. I just upgraded to 2.8.1 and am wondering if this is a new warning message:
[2024-01-23T15:02:27.020+0000] {options.py:83} WARNING - The swagger_ui directory could not be found.
Please install connexion with extra install: pip install connexion[swagger-ui]
or provide the path to your local installation by passing swagger_path=<your path>This warning message might comes from the different places:
FAB Auth Manager
airflow/airflow/providers/fab/auth_manager/fab_auth_manager.py
Lines 159 to 161 in 18d2498
| options={ | |
| "swagger_ui": conf.getboolean("webserver", "enable_swagger_ui", fallback=True), | |
| }, |
Internal API
airflow/airflow/www/extensions/init_views.py
Line 301 in 4d96a9a
| options={"swagger_ui": conf.getboolean("webserver", "enable_swagger_ui", fallback=True)}, |
The nature of this warning that we use bundled to Airflow swagger ui (added in #28788) that mean we do not require connexion[swagger-ui] however for proper work we need to setup swagger_path in Connexion 2.x options by the same way as it done in regular REST API:
airflow/airflow/www/extensions/init_views.py
Lines 276 to 279 in 4d96a9a
| options={ | |
| "swagger_ui": conf.getboolean("webserver", "enable_swagger_ui", fallback=True), | |
| "swagger_path": os.fspath(ROOT_APP_DIR.joinpath("www", "static", "dist", "swagger-ui")), | |
| }, |
Or disable swagger by provide swagger_ui=False if this components do not use swagger, unfortunetly I'm not confident about it.
In addition parameters names/types changed in Connexion 3, see: https://connexion.readthedocs.io/en/3.0.5/swagger_ui.html, so better to take it in account into the #36052 or similar PRs
Committer
- I acknowledge that I am a maintainer/committer of the Apache Airflow project.