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

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

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


##########
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:
   Good idea. Let me make this change



-- 
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