jedcunningham commented on code in PR #29523:
URL: https://github.com/apache/airflow/pull/29523#discussion_r1106179817


##########
airflow/__main__.py:
##########
@@ -24,12 +24,21 @@
 
 import argcomplete
 
+# The configuration module initializes and validates the conf object as a side 
effect the first
+# time it is imported. If it is not imported before importing the settings 
module, the conf
+# object will then be initted/validated as a side effect of it being imported 
in settings,
+# however this can cause issues since those modules are very tightly coupled 
and can
+# very easily cause import cycles in the conf init/validate code (since 
downstream code from
+# those functions likely import settings).
+# Therefore importing configuration early (as the first airflow import) avoids
+# any possible import cycles with settings downstream.
+from airflow import configuration

Review Comment:
   Why not import `conf` directly here?



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