ferruzzi commented on code in PR #62645:
URL: https://github.com/apache/airflow/pull/62645#discussion_r3023488310
##########
airflow-core/src/airflow/executors/workloads/task.py:
##########
@@ -73,6 +74,24 @@ class ExecuteTask(BaseDagBundleWorkload):
type: Literal["ExecuteTask"] = Field(init=False, default="ExecuteTask")
+ @property
+ def key(self) -> TaskInstanceKey:
+ """Return the TaskInstanceKey for this workload."""
+ return self.ti.key
Review Comment:
Nah, this should be right. `TaskInstanceKey`/`ti.key` is used all over the
code as the dict key. Currently in this PR, only LocalExecutor is completely
migrated over, but you can see examples of it in use in
local_executor._run_worker()
([main/before](https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/executors/local_executor.py#L67)
and
[now/after](https://github.com/apache/airflow/pull/62645/changes#diff-e6c8f3d778a4f3366b23d8d46a1c9650608ccbf2184e7292f0f7bbf4df37dbebR112))
--
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]