GitHub user jherrmannNetfonds added a comment to the discussion: [Question] 
Bundle-specific Python Path Isolation in Airflow 3.x Git Bundles

I had the same issue and tried to fix this by modifying the python path. But 
the issue is that the DAG processor probes `PYTHONPATH` directories during 
startup before the DAG bundle git checkout finishes. Python caches those paths 
as empty (`None` in `sys.path_importer_cache`). The cache is never invalidated, 
so later imports fail even though the files are now there.
My workaround for now is to call `importlib.invalidate_caches()` in one DAG to 
force Python to re-scan the directories.


GitHub link: 
https://github.com/apache/airflow/discussions/61901#discussioncomment-15984903

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to