kaxil commented on code in PR #34042:
URL: https://github.com/apache/airflow/pull/34042#discussion_r1314333805
##########
airflow/serialization/serialized_objects.py:
##########
@@ -438,7 +438,7 @@ def serialize(
json_pod = PodGenerator.serialize_pod(var)
return cls._encode(json_pod, type_=DAT.POD)
elif isinstance(var, DAG):
- return SerializedDAG.serialize_dag(var)
+ return cls._encode(SerializedDAG.serialize_dag(var), type_=DAT.DAG)
Review Comment:
There is no need to encode this, we expect it to have a top level "dag"
unique key as shown in
https://github.com/apache/airflow/blob/bf2d411a2a953d17f7847d23f0563589a0a58a94/tests/serialization/test_dag_serialization.py#L123
Similarly, we don't encode tasks or each operator, because we know the
structure that it would be within `["dag"]["tasks"]`
Check L445 and L447
--
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]