uranusjr commented on code in PR #32520:
URL: https://github.com/apache/airflow/pull/32520#discussion_r1320999883
##########
airflow/models/taskinstance.py:
##########
@@ -436,6 +436,7 @@ class TaskInstance(Base, LoggingMixin):
next_method = Column(String(1000))
next_kwargs = Column(MutableDict.as_mutable(ExtendedJSON))
+ _task_display_name = Column("task_display_name", String(2000), default="")
Review Comment:
I don’t quite understand why we should disinguish between an empty string
and None. The default display name in the DAG interface is an empty string, so
using that to signify _no display name_ and falling back to dag_id/task_id
makes sense to me without any additional validation. Adding None to the mix
seems unnecessarily complex.
##########
airflow/models/taskinstance.py:
##########
@@ -436,6 +436,7 @@ class TaskInstance(Base, LoggingMixin):
next_method = Column(String(1000))
next_kwargs = Column(MutableDict.as_mutable(ExtendedJSON))
+ _task_display_name = Column("task_display_name", String(2000), default="")
Review Comment:
I don’t quite understand why we should disinguish between an empty string
and None. The default display name in the DAG interface is an empty string, so
using that to signify _no display name_ and falling back to dag_id/task_id
makes sense to me without any additional validation. Adding None to the mix
seems unnecessarily complex.
--
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]