turbaszek commented on a change in pull request #9712:
URL: https://github.com/apache/airflow/pull/9712#discussion_r451343481



##########
File path: airflow/models/taskinstance.py
##########
@@ -126,9 +126,18 @@ def clear_task_instances(tis,
             dr.start_date = timezone.utcnow()
 
 
-# Key used to identify task instance
-# Tuple of: dag_id, task_id, execution_date, try_number
-TaskInstanceKeyType = Tuple[str, str, datetime, int]
+class TaskInstanceKeyType(NamedTuple):
+    """
+    Key used to identify task instance.
+    """
+    dag_id: str
+    task_id: str
+    execution_date: datetime
+    try_number: int
+
+    @property
+    def short(self) -> Tuple[str, str, datetime]:

Review comment:
       Not sure about this name. I think @mik-laj somewhere suggested that we 
can use `primary` or `primary_key` WDYT?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to