mik-laj commented on issue #8647:
URL: https://github.com/apache/airflow/issues/8647#issuecomment-623208206


   This is the expected behavior. 
   
   Airflow adds **an additional 3 directories** to the variable `sys.path`.
   * ``conf.get('core', 'dags_folder')``
   * ``conf.get('core', 'airflow_home')``
   * ``conf.get('core', 'plugins_folder')``
   
   This means that plugins and DAG can use imports that match the current 
directory relative to each other.   Otherwise, the plugin would not be able to 
load another file that is in the directory next to the plugin or DAG so that it 
cannot load the file that is next to it.
   
   In Airflow master you can check the content of the sys.path variable using 
the airflow info command.
   https://github.com/apache/airflow/pull/8290
   
   The problem is only the lack of description of this behavior in the 
documentation. However, I am already working on it in my free time.  The first 
step is to add the airflow info command because I need it to describe this 
behavior accurately.
   
   I recommend not using plugins to add new operators. This is problematic 
behavior and causes various problems, among others increased RAM consumption, 
slower task startup. It's best to load operators as if they were normal python 
modules. Ideally, it would be a separate package installed by pip or added to 
PYTHONPATH.
   
   


----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to