Reputation: 538
Documentation for Airflow https://airflow.readthedocs.io/en/1.9.0/configuration.html
talks about setting an environment variable named $AIRFLOW_HOME which is where airflow will be installed. The configuration file airflow.cfg is created by this process has an attribute called airflow_home in the [core] section at the top of the file. This makes sense.
But, the way you override airflow variables in the airflow.cfg with environment variables is with the pattern AIRFLOW__[SECTION]__VARIABLENAME. Based on that pattern, the airflow home environment variables should technically be managed by the environment variable AIRFLOW__CORE__AIRFLOW_HOME and not AIRFLOW_HOME.
Why the difference? Are both needed? is one of them not needed? do they do different things?
Upvotes: 1
Views: 5060
Reputation: 4366
They do different things insofar that $AIRFLOW_HOME
works as intended: the value you set will be what you get, and $AIRFLOW__CORE__AIRFLOW_HOME
is likely to screw things up.
The $AIRFLOW_HOME
value is special in that it's a prerequisite for a handful of actions and is read without support for the $AIRFLOW__[SECTION]__VARIABLENAME
interpolation.
Upvotes: 2