potiuk commented on PR #30367: URL: https://github.com/apache/airflow/pull/30367#issuecomment-1490347815
> About side effects, from what I test and read in the source code, there shouldn't be any. Just to be clear, I also **think** there might be no side effects. But I just read the code (which I did not write BTW.) and someone who added this feature made it absolutely clear that you have to REALLY know what you are doing. I am just asking are you REALLY sure you know it and are you aware of all the side effects. An example of that is that maybe (just maybe) in case of Python venv operator. in some cases whatever "initialize_settings" (which the variable disable) does, is needed in the next step. From what I know initializing settings for example makes sure that if you have no config file it will generate one - including default values, by disabling it via the variable, this side-efect might be gone (and if something else relies on it, it might be broken). > I'm not sure to fully understand your point here: > > Changing production behaviour in order to make "DEBUG" settings behave wrongly I mean that in order to get "debug" setting works we are changing the behaviour of code that is going to be executed even in "production" mode (i.e. with INFO level). Adding _AIRFLOW__AS_LIBRARY definitely changes the behaviour. No matter how much we think it is risky, it's generally a bad idea. I think there are better ways of solving it: * find or add a way to disable those debug logs (and only them, nothing else) rather than using `_AIRFLOW__AS_LIBRARY` * only add `_AIRFLOW__AS_LIBRARY` in case DEBUG level is set. Both are safer and solve the problem -- 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]
