Skip to content

Commit 0938f4b

Browse files
committed
Make task bundle access dependencies explicit
Module-level imports keep dependency analysis reliable and follow Airflow's import-placement contract without changing bundle access behavior.
1 parent 6f2b4eb commit 0938f4b

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

task-sdk/src/airflow/sdk/execution_time/bundles.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@
2525
from __future__ import annotations
2626

2727
import os
28+
from getpass import getuser
2829
from typing import TYPE_CHECKING
2930

3031
from airflow.dag_processing.bundles.manager import DagBundlesManager # noqa: SDK002
32+
from airflow.sdk.exceptions import AirflowException
3133
from airflow.sdk.execution_time.tracing import detail_span
3234

3335
if TYPE_CHECKING:
@@ -68,10 +70,6 @@ def verify_bundle_access(bundle_instance: BaseDagBundle) -> None:
6870
:param bundle_instance: The bundle instance to check
6971
:raises AirflowException: if bundle is not accessible
7072
"""
71-
from getpass import getuser
72-
73-
from airflow.sdk.exceptions import AirflowException
74-
7573
bundle_path = bundle_instance.path
7674

7775
if not bundle_path.exists():

0 commit comments

Comments
 (0)