uranusjr commented on a change in pull request #20795: URL: https://github.com/apache/airflow/pull/20795#discussion_r783675997
########## File path: airflow/models/taskmixin.py ########## @@ -114,6 +115,14 @@ class DAGNode(DependencyMixin, metaclass=ABCMeta): def node_id(self) -> str: raise NotImplementedError() + @property + def label(self) -> Optional[str]: + tg: Optional["TaskGroup"] = getattr(self, 'task_group', None) + 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 :] Review comment: ```suggestion return self.node_id.split(".", 1)[-1] ``` -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org