jscheffl commented on code in PR #38446:
URL: https://github.com/apache/airflow/pull/38446#discussion_r1540256696


##########
airflow/models/taskmixin.py:
##########
@@ -161,10 +161,16 @@ def node_id(self) -> str:
 
     @property
     def label(self) -> str | None:
+        from airflow.models.baseoperator import BaseOperator
+        from airflow.models.mappedoperator import MappedOperator
+
         tg = self.task_group
         if tg and tg.node_id and tg.prefix_group_id:
             # "task_group_id.task_id" -> "task_id"
             return self.node_id[len(tg.node_id) + 1 :]
+
+        if isinstance(self, (BaseOperator, MappedOperator)):
+            return self.task_display_name
         return self.node_id

Review Comment:
   Additional to this: I believe the current PR lags the feature as well to 
have a display name on the task groups in general. But would also propose to 
push this in a follow-up PR. This could contain the cleanup.



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