From 7490861887325ac53b57614d32cfd21638231725 Mon Sep 17 00:00:00 2001 From: LIU ZHE YOU Date: Sat, 20 Dec 2025 11:49:52 +0800 Subject: [PATCH] Add compat deprecation handling for [webserver/base_url] --- .../administration-and-deployment/production-deployment.rst | 2 +- shared/configuration/src/airflow_shared/configuration/parser.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/airflow-core/docs/administration-and-deployment/production-deployment.rst b/airflow-core/docs/administration-and-deployment/production-deployment.rst index 78d0e0966bc42..e4a6c1c814b2a 100644 --- a/airflow-core/docs/administration-and-deployment/production-deployment.rst +++ b/airflow-core/docs/administration-and-deployment/production-deployment.rst @@ -90,7 +90,7 @@ e.g. metadata DB, password, etc. You can accomplish this using the format :envva .. code-block:: bash AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=my_conn_id - AIRFLOW__WEBSERVER__BASE_URL=http://host:port + AIRFLOW__API__BASE_URL=http://host:port Some configurations such as the Airflow Backend connection URI can be derived from bash commands as well: diff --git a/shared/configuration/src/airflow_shared/configuration/parser.py b/shared/configuration/src/airflow_shared/configuration/parser.py index eaa1de735616e..5c4781ae53fa2 100644 --- a/shared/configuration/src/airflow_shared/configuration/parser.py +++ b/shared/configuration/src/airflow_shared/configuration/parser.py @@ -129,6 +129,7 @@ class AirflowConfigParser(ConfigParser): # DeprecationWarning will be issued and the old option will be used instead deprecated_options: dict[tuple[str, str], tuple[str, str, str]] = { ("dag_processor", "refresh_interval"): ("scheduler", "dag_dir_list_interval", "3.0"), + ("api", "base_url"): ("webserver", "base_url", "3.0"), ("api", "host"): ("webserver", "web_server_host", "3.0"), ("api", "port"): ("webserver", "web_server_port", "3.0"), ("api", "workers"): ("webserver", "workers", "3.0"),