ashb commented on a change in pull request #15395:
URL: https://github.com/apache/airflow/pull/15395#discussion_r614418669
##########
File path: airflow/serialization/serialized_objects.py
##########
@@ -240,10 +240,10 @@ def _serialize(cls, var: Any) -> Any: # Unfortunately
there is no support for r
return str(get_python_source(var))
elif isinstance(var, set):
# FIXME: casts set to list in customized serialization in future.
- return cls._encode(sorted(cls._serialize(v) for v in var),
type_=DAT.SET)
+ return cls._encode(cls._serialize_and_sort(var), type_=DAT.SET)
elif isinstance(var, tuple):
# FIXME: casts tuple to list in customized serialization in future.
- return cls._encode(sorted(cls._serialize(v) for v in var),
type_=DAT.TUPLE)
+ return cls._encode(cls._serialize_and_sort(var), type_=DAT.TUPLE)
Review comment:
Wait -- isn't this a bug -- we shouldn't be sorting Tuples or lists --
that means we've changed
`[ 2, 0, 3 ]`
in to
`[0, 2, 3]` which is different.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]