From dde6d92904cdfb11427c5622dbb96cddd8a4ae86 Mon Sep 17 00:00:00 2001 From: Pankaj Koti Date: Thu, 10 Apr 2025 19:17:47 +0530 Subject: [PATCH] Skip associating 'openlineage_events_completes' to ti in AF3 --- cosmos/operators/local.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cosmos/operators/local.py b/cosmos/operators/local.py index ca49b14b1f..ea2c2838ac 100644 --- a/cosmos/operators/local.py +++ b/cosmos/operators/local.py @@ -559,7 +559,10 @@ def run_command( env=env, cwd=tmp_project_dir, ) - if is_openlineage_available: + if is_openlineage_available and AIRFLOW_VERSION.major < _AIRFLOW3_VERSION.major: + # Airflow 3 does not support associating 'openlineage_events_completes' with task_instance. The + # support for this is expected to be worked upon while addressing issue: + # https://github.com/astronomer/astronomer-cosmos/issues/1635 self.calculate_openlineage_events_completes(env, tmp_dir_path) context[ "task_instance"