From bc98126ec0a4b7b31f14d577c46398807434aff0 Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Fri, 20 Dec 2024 06:44:46 +0000 Subject: [PATCH] Force to fetch the actual dag, add more debug logs --- cosmos/listeners/dag_run_listener.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cosmos/listeners/dag_run_listener.py b/cosmos/listeners/dag_run_listener.py index e21897687..ec798f2bc 100644 --- a/cosmos/listeners/dag_run_listener.py +++ b/cosmos/listeners/dag_run_listener.py @@ -53,7 +53,6 @@ def on_dag_run_success(dag_run: DagRun, msg: str) -> None: # The following is an airflow.serialization.serialized_objects.SerializedDAG instance serialized_dag = dag_run.get_dag() - serialized_dag logger.info(f"dir: {dir(serialized_dag)}") logger.info(f"1: {serialized_dag.fileloc}") @@ -63,7 +62,7 @@ def on_dag_run_success(dag_run: DagRun, msg: str) -> None: from airflow.models import DagBag - dag_bag = DagBag(dag_folder=dag.fileloc, include_examples=False) + dag_bag = DagBag(dag_folder=serialized_dag.fileloc, include_examples=False) dag = dag_bag.get_dag(dag_run.dag_id) if not uses_cosmos(dag):