ashb commented on code in PR #45583:
URL: https://github.com/apache/airflow/pull/45583#discussion_r1914702757
##########
airflow/models/taskinstance.py:
##########
@@ -1874,6 +1875,20 @@ def operator_name(self) -> str | None:
def task_display_name(self) -> str:
return self._task_display_property_value or self.task_id
+ @classmethod
+ def from_runtime_ti(cls, runtime_ti: RuntimeTaskInstanceProtocol) ->
TaskInstance:
+ ti = TaskInstance(
+ run_id=runtime_ti.run_id,
+ task=runtime_ti.task, # type: ignore[arg-type]
+ map_index=runtime_ti.map_index or -1,
Review Comment:
This will be incorrect for `map_index == 0`
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]