dstandish commented on code in PR #38570:
URL: https://github.com/apache/airflow/pull/38570#discussion_r1548190050


##########
airflow/serialization/serialized_objects.py:
##########
@@ -538,9 +538,9 @@ def serialize(
         elif isinstance(var, Resources):
             return var.to_dict()
         elif isinstance(var, MappedOperator):
-            return SerializedBaseOperator.serialize_mapped_operator(var)
+            return 
cls._encode(SerializedBaseOperator.serialize_mapped_operator(var), type_=DAT.OP)

Review Comment:
   @potiuk @uranusjr this PR needs a closer look.  what i'm doing is making it 
so that when we serialize an Operator, we actually run it through `cls._encode` 
so that on the other side we actually know what the object is.  we got away 
with *not* doing that up to now because `task` is always serialized as part of 
something else (e.g. TI or DAG) and custom serialization handles it.  but with 
AIP-44 there are times when we want to be able to serialize a task object 
directly and thus we need a way to do it. see below for backcompat code for 
deserializing old and new way.



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