ferruzzi commented on code in PR #61153:
URL: https://github.com/apache/airflow/pull/61153#discussion_r2843610592
##########
airflow-core/src/airflow/models/taskinstance.py:
##########
@@ -802,6 +803,14 @@ def key(self) -> TaskInstanceKey:
"""Returns a tuple that identifies the task instance uniquely."""
return TaskInstanceKey(self.dag_id, self.task_id, self.run_id,
self.try_number, self.map_index)
+ def get_dag_id(self) -> str:
+ """Return the DAG ID for scheduler routing."""
+ return self.dag_id
+
+ def get_executor_name(self) -> str | None:
+ """Return the executor name for scheduler routing."""
+ return self.executor
Review Comment:
I see where you are going and tried it that way at first, but it was causing
name conflict issues with the SQLALchemy `TaskInstance` model which uses the
same name for one of the columns. Add to that the fact that TI and Callback
are retrieving that value differently, I felt that having the getters was a
more unified/standardized interface.
--
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]