simi commented on code in PR #55894:
URL: https://github.com/apache/airflow/pull/55894#discussion_r2664725541


##########
airflow-core/src/airflow/dag_processing/dagbag.py:
##########
@@ -235,6 +235,13 @@ def __init__(
         self.bundle_path = bundle_path
         self.bundle_name = bundle_name
 
+        # Add bundle path to sys.path if provided.
+        # This allows DAG files to import modules from their bundle directory.
+        # No cleanup is performed - this is intentional for ephemeral processes
+        # (dag processor, task runner, CLI) where the process exits after use.
+        if bundle_path and str(bundle_path) not in sys.path:
+            sys.path.append(str(bundle_path))

Review Comment:
   Yes, I have moved this into draft. I'm working on better sollution.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to