m8719-github commented on code in PR #60065:
URL: https://github.com/apache/airflow/pull/60065#discussion_r2665703400


##########
airflow-core/src/airflow/serialization/helpers.py:
##########
@@ -71,7 +75,11 @@ def sort_dict_recursively(obj: Any) -> Any:
         try:
             serialized = template_field.serialize()
         except AttributeError:
-            serialized = str(template_field)
+            if callable(template_field):
+                fingerprint = get_python_source_md5(template_field)

Review Comment:
   I am for this as well, using only the name. It has a better user experience 
IMHO; i.e: the DAG version won't increment unless there is a visible DAG code 
change and it's actually visible in the UI (if I understand the logic correctly)
   Our use case that triggered this bug is this: we are populating KPO 
labels/annotations via callables and they are imported from a common module, 
part of the bundle. The current MD5 fingerprint implementation will increment 
version for all our DAGs with KPOs if source code of these callables changes 
but code visible in the UI will stay the same so a user/operator will be left 
scratching their head wondering why the version incremented unless they go 
digging through the common module changes.



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