-
Notifications
You must be signed in to change notification settings - Fork 17.4k
Making webserver config customisable #29926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a6c5ee9
77802f7
26fc78e
b85cd0c
4ce74b9
5b73b18
2152dea
5edfd1d
68e422b
ba81ae6
0f6b784
cddd581
acd291e
13f1e9c
62bbcce
26d07ba
131d2c2
6d3f701
5882ee9
2102599
02685c8
98ace93
2b271f6
3be8ca0
86048bd
4305a48
4b0ca76
41052e3
5184664
2993bff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -1483,7 +1483,7 @@ def initialize_config() -> AirflowConfigParser: | |||||||
|
|
||||||||
| Called for you automatically as part of the Airflow boot process. | ||||||||
| """ | ||||||||
| global FERNET_KEY, AIRFLOW_HOME | ||||||||
| global FERNET_KEY, AIRFLOW_HOME, WEBSERVER_CONFIG | ||||||||
|
|
||||||||
| default_config = _parameterized_config_from_template("default_airflow.cfg") | ||||||||
|
|
||||||||
|
|
@@ -1548,10 +1548,7 @@ def initialize_config() -> AirflowConfigParser: | |||||||
| if local_conf.getboolean("core", "unit_test_mode"): | ||||||||
| local_conf.load_test_config() | ||||||||
|
|
||||||||
| # Make it no longer a proxy variable, just set it to an actual string | ||||||||
| global WEBSERVER_CONFIG | ||||||||
| WEBSERVER_CONFIG = AIRFLOW_HOME + "/webserver_config.py" | ||||||||
|
|
||||||||
| WEBSERVER_CONFIG = local_conf.get("webserver", "config_file") | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs formatting, but I think we need:
Suggested change
Otherwise it will fail for those who have the old config file
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (or is it aautomaticaly handled with the default?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's automatically handled. Most fallbacks can go honestly, much more useful in providers than core.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I vaguely recall that - I wanted to clean up the code doing it once and failed miserably :)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for clarifying this. Was not so aware about this |
||||||||
| if not os.path.isfile(WEBSERVER_CONFIG): | ||||||||
| import shutil | ||||||||
|
|
||||||||
|
|
@@ -1786,7 +1783,6 @@ def __getattr__(name): | |||||||
| AIRFLOW_HOME = get_airflow_home() | ||||||||
| AIRFLOW_CONFIG = get_airflow_config(AIRFLOW_HOME) | ||||||||
|
|
||||||||
|
|
||||||||
| # Set up dags folder for unit tests | ||||||||
| # this directory won't exist if users install via pip | ||||||||
| _TEST_DAGS_FOLDER = os.path.join( | ||||||||
|
|
@@ -1806,7 +1802,6 @@ def __getattr__(name): | |||||||
| else: | ||||||||
| TEST_PLUGINS_FOLDER = os.path.join(AIRFLOW_HOME, "plugins") | ||||||||
|
|
||||||||
|
|
||||||||
| TEST_CONFIG_FILE = get_airflow_test_config(AIRFLOW_HOME) | ||||||||
|
|
||||||||
| SECRET_KEY = b64encode(os.urandom(16)).decode("utf-8") | ||||||||
|
|
||||||||
Uh oh!
There was an error while loading. Please reload this page.