feluelle commented on a change in pull request #6601: [AIRFLOW-6010] Do not import airflow settings directly. URL: https://github.com/apache/airflow/pull/6601#discussion_r348012438
########## File path: airflow/bin/cli.py ########## @@ -70,10 +70,18 @@ LOG = LoggingMixin().log -DAGS_FOLDER = settings.DAGS_FOLDER -if "BUILDING_AIRFLOW_DOCS" in os.environ: - DAGS_FOLDER = '[AIRFLOW_HOME]/dags' +def get_dags_folder(): + """Retrieves DAGS_FOLDER to use.""" + from airflow.settings import DAGS_FOLDER Review comment: I think if we introduce these changes here we are working around the bug but not entirely fixing it. I think most of these errors occur because of bad modules (structure). ---------------------------------------------------------------- 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
