From dbdf1d7b4d3fb1f20394f2d1894cd8a0619e3639 Mon Sep 17 00:00:00 2001 From: Kaxil Naik Date: Thu, 31 Oct 2024 00:39:51 +0000 Subject: [PATCH] Remove `TaskInstanceKey.reduced` Not sure why this was deferred in https://github.com/apache/airflow/pull/39336/files#r1594440137 but I can't find any usages of this in the codebase. --- airflow/models/taskinstancekey.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/airflow/models/taskinstancekey.py b/airflow/models/taskinstancekey.py index d6e647f598809..7261c5dbe8f78 100644 --- a/airflow/models/taskinstancekey.py +++ b/airflow/models/taskinstancekey.py @@ -34,14 +34,6 @@ def primary(self) -> tuple[str, str, str, int]: """Return task instance primary key part of the key.""" return self.dag_id, self.task_id, self.run_id, self.map_index - @property - def reduced(self) -> TaskInstanceKey: - """Remake the key by subtracting 1 from try number to match in memory information.""" - # todo (dstandish): remove this property - return TaskInstanceKey( - self.dag_id, self.task_id, self.run_id, max(1, self.try_number - 1), self.map_index - ) - def with_try_number(self, try_number: int) -> TaskInstanceKey: """Return TaskInstanceKey with provided ``try_number``.""" return TaskInstanceKey(self.dag_id, self.task_id, self.run_id, try_number, self.map_index)