fix(dag_factory): safely clean task_group child on fallback

This commit is contained in:
2026-10-21 15:14:21 +07:00
parent 90c0a03b7e
commit 5de6e26181
+2
View File
@@ -556,6 +556,8 @@ def build_dag_from_yaml(config_file: str) -> DAG:
)
except Exception as e:
print(f"[COSMOS_FALLBACK] Error creating DbtTaskGroup for {t_id}: {e}")
if hasattr(dag, 'task_group') and t_id in dag.task_group.children:
del dag.task_group.children[t_id]
task_obj = DbtTrinoIcebergOperator(
task_id=t_id,
select_models=select_m,