You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dump configurations in airflow scheduler logs based on the config it reads #22141
We don't have any way to cross-verify the configs that the airflow scheduler uses. It would be good to have it logged somewhere so that users can cross-verify it.
Use case/motivation
How do you know for sure that the configs in airflow.cfg are being correctly parsed by airflow scheduler?
I thhini it would be super helpful. I've seen many people who had problems with understanding what their configuraiton is.
The airflow config list is not enough - the problem is that many people run airflow using systemd or other solutions and it would be great to know what ACTUALLY was used by the process that started.
In many cases people do not realise that variables they have set in .bashrc are not set in systemd for example, and there might be plenty other reasons why running airflow config list provides different results than what the running airflow process sees.
Hi, I would like to work on this feature and this is my first patch. I looked into airflow conf list that has show_config to print config. It doesn't seem to mask sensitive values. I wrote another function that initializes AirflowConfigParser and uses as_dict that masks sensitive values to read the masked config again using read_dict. I am not sure if the approach is correct. Patch with test as below
Activity
potiuk commentedon Mar 10, 2022
I thhini it would be super helpful. I've seen many people who had problems with understanding what their configuraiton is.
The
airflow config listis not enough - the problem is that many people run airflow using systemd or other solutions and it would be great to know what ACTUALLY was used by the process that started.In many cases people do not realise that variables they have set in .bashrc are not set in systemd for example, and there might be plenty other reasons why running airflow config list provides different results than what the running airflow process sees.
Big +1 on this one.
uranusjr commentedon Mar 13, 2022
Just dump everything to the log file when the scheduler launches, then?
potiuk commentedon Mar 13, 2022
Yep. we even have some functions for this (used in CLI) - It also masks sensitive values, so this is important to use it.
tirkarthi commentedon Mar 28, 2022
Hi, I would like to work on this feature and this is my first patch. I looked into
airflow conf listthat hasshow_configto print config. It doesn't seem to mask sensitive values. I wrote another function that initializesAirflowConfigParserand usesas_dictthat masks sensitive values to read the masked config again usingread_dict. I am not sure if the approach is correct. Patch with test as belowairflow/airflow/cli/commands/config_command.py
Lines 23 to 35 in ae6570f
Patch :
potiuk commentedon Mar 29, 2022
Just open a PR with it it (referring to this one - it will be easier to dicuss it).
tirkarthi commentedon Mar 29, 2022
Thanks, created #22588