[Question] Bundle-specific Python Path Isolation in Airflow 3.x Git BundlesEnvironment:
Context (Path Architecture):
The Directory Structure (Inside The Problem: This is because the Key Challenges:
Questions:
We are looking for a clean, infrastructure-level solution that aligns with the AIP-66 design philosophy. Thank you! |
Replies: 2 comments
|
Update: I found the solution! The issue was caused by the subdir parameter in my Git Bundle configuration. {
"name": "TESTBED2",
"classpath": "airflow.providers.git.bundles.git.GitDagBundle",
"kwargs": {
"git_conn_id": "GITHUB__airflow-testbed2",
"subdir": "dags", // This was the culprit
"tracking_ref": "AIRFLOW-DEPLOY/develop",
"refresh_interval": 60
}
}When Since my internal library The Fix: Key Takeaway: |
|
I had the same issue and tried to fix this by modifying the python path. But the issue is that the DAG processor probes |
Update: I found the solution!
The issue was caused by the subdir parameter in my Git Bundle configuration.
The Root Cause:
In my initial configuration, I had the subdir argument set to "dags":
{ "name": "TESTBED2", "classpath": "airflow.providers.git.bundles.git.GitDagBundle", "kwargs": { "git_conn_id": "GITHUB__airflow-testbed2", "subdir": "dags", // This was the culprit "tracking_ref": "AIRFLOW-DEPLOY/develop", "refresh_interval": 60 } }When
subdiris specified in the Git Bundle configuration, Airflow treats that specific subdirectory as the root for DAG discovery and, crucially, adds only that subdirectory to thesys.path.Since my internal library
airflow_lib/…