Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions airflow-core/src/airflow/dag_processing/bundles/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,21 @@ def initialize(self) -> None:
This method must ultimately be safe to call concurrently from different threads or processes.
If it isn't naturally safe, you'll need to make it so with some form of locking.
There is a `lock` context manager on this class available for this purpose.

If you override this method, ensure you call `super().initialize()`
at the end of your method, after the bundle is initialized, not the beginning.
"""
self.is_initialized = True

# Check if the bundle path exists after initialization
bundle_path = self.path
if not bundle_path.exists():
log.warning(
"Bundle '%s' path does not exist: %s. This may cause DAG loading issues.",
self.name,
bundle_path,
)

@property
@abstractmethod
def path(self) -> Path:
Expand Down