[ 
https://issues.apache.org/jira/browse/AIRFLOW-4573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16857608#comment-16857608
 ] 

ASF subversion and git services commented on AIRFLOW-4573:
----------------------------------------------------------

Commit 6872d070831760ce9db56c924784d15696ca0971 in airflow's branch 
refs/heads/v1-10-stable from Philippe Gagnon
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=6872d07 ]

[AIRFLOW-4573] Import airflow_local_settings after prepare_classpath (#5330)

Moves the airflow_local_settings import code into a dedicated function
in settings.py and adds a call to it in initialize after prepare_syspath

(cherry picked from commit d1626d80b57de93c344b78b3fa1af7066345aa20)


> airflow_local_settings is imported before sys.path is populated
> ---------------------------------------------------------------
>
>                 Key: AIRFLOW-4573
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4573
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.10.3
>            Reporter: Philippe Gagnon
>            Assignee: Philippe Gagnon
>            Priority: Major
>              Labels: settings
>             Fix For: 1.10.4
>
>
> {{settings.py}} imports the contents of {{airflow_local_settings.py}} (which 
> is expected to live under {{$AIRFLOW_HOME/config}}) before it is added to 
> \{{sys.path}}. Thus, unless \{{airflow_local_settings.py}} is added manually 
> to {{PYTHONPATH}} before execution, the module will not be found.
> This is caused by the \{{airflow_local_settings}} module getting imported 
> before {{prepare_classpath()}} is called, which is the function responsible 
> for adding \{{DAGS_FOLDER}}, \{{PLUGINS_FOLDER}} and {{$AIRFLOW_HOME/config}} 
> to {{sys.path}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to