Subham-KRLX commented on code in PR #64945:
URL: https://github.com/apache/airflow/pull/64945#discussion_r3067450285
##########
task-sdk/src/airflow/sdk/definitions/dag.py:
##########
@@ -1298,13 +1295,12 @@ def test(
for bundle in manager.get_all_dag_bundles():
if not bundle.is_initialized:
bundle.initialize()
- with _airflow_parsing_context_manager(dag_id=self.dag_id):
- dagbag = BundleDagBag(
- dag_folder=bundle.path,
- bundle_path=bundle.path,
- bundle_name=bundle.name,
- )
- sync_bag_to_db(dagbag, bundle.name, bundle.version)
+ dagbag = BundleDagBag(
+ dag_folder=bundle.path,
+ bundle_path=bundle.path,
+ bundle_name=bundle.name,
+ )
+ sync_bag_to_db(dagbag, bundle.name, bundle.version)
version = DagVersion.get_version(self.dag_id)
if version:
break
Review Comment:
This update ensures dag.test() correctly syncs all available bundles instead
of stopping early once it finds the parent DAG this fix allows
TriggerDagRunOperator to work reliably across different bundles by making sure
all target DAGs are materialized in the database before execution.
--
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]