You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2023/03/05 10:37:25 UTC

[GitHub] [airflow] potiuk commented on a diff in pull request #29926: Making webserver config customisable

potiuk commented on code in PR #29926:
URL: https://github.com/apache/airflow/pull/29926#discussion_r1125639369


##########
airflow/configuration.py:
##########
@@ -1535,9 +1535,24 @@ def initialize_config() -> AirflowConfigParser:
     global WEBSERVER_CONFIG
     WEBSERVER_CONFIG = AIRFLOW_HOME + "/webserver_config.py"
 
+    # Prioritise airflow webserver config that is present in the config location
+    webserver_config_in_config = AIRFLOW_HOME + "/config/webserver_config.py"
+    in_airflow_home = True
+
     if not os.path.isfile(WEBSERVER_CONFIG):
+        if os.path.isfile(webserver_config_in_config):
+            in_airflow_home = False
+            WEBSERVER_CONFIG = webserver_config_in_config
+
         import shutil
 
+        if in_airflow_home:
+            log.warning(
+                "webserver_config.py is still present in %s, this will be deprecated and moved to %s",

Review Comment:
   ```suggestion
                   "webserver_config.py is still present in %s, this locaation is deprecated. You should move your webserver_config.py to %s",
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org