GitHub user samraj2k added a comment to the discussion: [Proposal] Separate DAG discovery path from DAG bundle import root
Thanks @hamedrabah for the inputs! > safest current solution is to make shared code an installed Python package Agree on this, but at times this is not a feasible solution. For a existing repository with a specific DAGs directory, the imports can be anchored from top level. Infact this is quite common for large monorepo. The assumptions currently is that the import root is same as where DAGs need to be processed, and from this discussion I want inputs if this is even a valid assumption. > but an installed package gives clearer versioning and avoids module-name > collisions between bundles. Since the file is parsed in the subprocess, there should be no chance of collision imo. The import_path (as per my approach) would be where sys.path will be passed in the subprocess. > but the security and distribution semantics need to be part of the contract Definitely I can add that, but since this lies on deployment manager to set the correct import path, securty wise too I think it should be fine Let me know if I am missing something, I can also start a discuss thread of devlist! GitHub link: https://github.com/apache/airflow/discussions/70313#discussioncomment-18167065 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
