BasPH edited a comment on issue #8255: Config value interpolation not working 
when set as environment variable
URL: https://github.com/apache/airflow/issues/8255#issuecomment-612505957
 
 
   Dug a bit more into this issue. It seems Airflow builds its configuration in 
a rather odd way. First there is an `AirflowConfigParser`, which is the class 
you get when importing `from airflow.configuration import conf`. In addition to 
overriding e.g. `ConfigParser.get()`, to support fetching configuration from 
environment variables and others, the AirflowConfigParser also holds an 
attribute `airflow_defaults` with is a "standard" ConfigParser by itself, used 
for looking up default values if none of the custom ways for setting config are 
used.
   
   This makes it difficult to fix this issue. Interpolation of config values is 
done in an `Interpolation` class, which can be overridden to also support 
fetching values from the custom config. However, since there a (standard) 
ConfigParser inside the AirflowConfigParser for the default values, we'd have 
to hack around to also support the custom config fetching ways in there.
   
   All in all, it might be technically possible to fix, but I'd rather opt for 
rewriting the whole configuration module, to avoid more hacking and take the 
opportunity to create something simple to understand.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to