-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
[AIRFLOW-3540] Respect environment config when looking up config file. #4340
Conversation
5f023e9
to
2d66bf9
Compare
Codecov Report
@@ Coverage Diff @@
## master #4340 +/- ##
==========================================
+ Coverage 78.1% 78.11% +0.01%
==========================================
Files 201 201
Lines 16471 16471
==========================================
+ Hits 12864 12866 +2
+ Misses 3607 3605 -2
Continue to review full report at Codecov.
|
lgtm, could you add a unit test for this change? |
:D This confused me just yesterday! |
airflow/configuration.py
Outdated
|
||
mkdir_p(AIRFLOW_HOME) | ||
|
||
AIRFLOW_CONFIG = expand_env_var(os.environ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks suspect - we're passing a dict to expand_env_var()
, not a single value.
This probably deserves a note in UPDATING.md as it could in theory mean someone's install won't pick up an airflow.cfg that they were relying on before. |
665d257
to
9f130ac
Compare
9f130ac
to
1fa4005
Compare
lgtm |
Make sure you have checked all steps below.
Jira
Description
If
~/airflow/airflow.cfg
exists, airflow uses that file instead of$AIRFLOW_HOME/airflow.cfg
. This behavior is confusing--airflow shouldn't look for its config file in one location if it happens to exist there, else in another location. If$AIRFLOW_HOME
is set and$AIRFLOW_CONFIG
is not, we should only check$AIRFLOW_HOME/airflow.cfg
.Tests
Commits
Documentation
Code Quality
flake8