ashb commented on code in PR #68760:
URL: https://github.com/apache/airflow/pull/68760#discussion_r3528183756
##########
task-sdk/src/airflow/sdk/bases/operator.py:
##########
@@ -588,9 +589,32 @@ def __new__(cls, name, bases, namespace, **kwargs):
if new_cls.__init__ is not first_superclass.__init__:
new_cls.__init__ = cls._apply_defaults(new_cls.__init__)
+ _warn_on_invalid_ui_color(name, namespace, new_cls.__module__)
+
return new_cls
+def _warn_on_invalid_ui_color(name: str, namespace: dict[str, Any], module:
str) -> None:
+ """
+ Warn when user code sets ``ui_color``/``ui_fgcolor`` to a non Chakra color
token.
+
+ Such values are ignored by the UI graph (only Chakra palette tokens like
``blue.500`` are
+ rendered). Built-in operators (``airflow.*``, including providers) are
left alone so the many
+ that still carry legacy hex values do not flood Dag parsing with warnings.
+ """
+ if module.startswith("airflow."):
+ return
Review Comment:
Why this?
--
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]