potiuk commented on PR #22588:
URL: https://github.com/apache/airflow/pull/22588#issuecomment-1096693035

   I think it's worth to revive it @tirkarthi 
   
   > +1 for having it in `airflow config list` with a flag for showing/hiding 
defaults only. Feels out of place in logs
   
   Hey @kaxil - I think you do not fully grasp the problem we are trying to 
solve. Both should be there - logs and CLI. As stated elsewhere CLI might give 
DIFFERENT results than what airflow sees, especially when you use systemd. 
   
   Many people (even those who are tasked with installing Airlfow) are not 
aware that setting configuration and variables in `.bashrc` or `.zshrc` will 
not work when they run airflow via systemd - simply because those variables are 
not sourced.
   Yet you can find plenty of guides on setting the variables all over the 
internet asking you to add them to .bashrc or similar.
   
   And if you do it for "airflow" user, ti all looks COOL. `airflow config` 
shows the right setting, `airflow scheduler` run manually works flawlessly, but 
then when you run it via systemd, suddenly the default "sqlite" database is 
used as this is default fallback of airflow if SQLALCHEMY variable  is not set  
(but it was in .bashrc).
   
   And we only find out because the user sends us a stacktrace that indicates 
that sqlite database has not been initialized (and we only know that this is 
sqlite because you see deep in the stactrace that sqlite driver is used).
   
   And those users claim that "no we are not using sqlite - we are using 
Postgres - look, this is output of my `arflow config` command). But they do not 
realize their airflow config is different because their variables are not set 
via systemd.
   
   Those are true stories which I experienced (and mutliple times). The only 
way to check what REALLLY airlfow sees is to print it in the logs together with 
the source where they came from. There is no other certain way.
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to