ferruzzi commented on code in PR #61153:
URL: https://github.com/apache/airflow/pull/61153#discussion_r2843692962


##########
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:
   To clarify: it wasn't an exception, just confusing and misleading.  Plus, 
based on my reading, if there was ever a mismatch between the two values since 
there is name reuse, Python will take the value from SQLAlchemy's 
TaskInstance.dag_id column over this property and that might lead to confusion. 
 But like I said, it should work from a technical standpoint if you feel 
strongly. .



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

Reply via email to