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


##########
airflow/serialization/serialized_objects.py:
##########
@@ -1462,9 +1462,15 @@ def deserialize_dag(cls, encoded_dag: dict[str, Any]) -> 
SerializedDAG:
                 v = set(v)
             elif k == "tasks":
                 SerializedBaseOperator._load_operator_extra_links = 
cls._load_operator_extra_links
-
-                v = {task["task_id"]: 
SerializedBaseOperator.deserialize_operator(task) for task in v}
+                tasks = {}
+                for obj in v:
+                    if obj.get(Encoding.TYPE) == DAT.OP:
+                        deser = 
SerializedBaseOperator.deserialize_operator(obj[Encoding.VAR])
+                        tasks[deser.task_id] = deser
+                    else:  # this is backcompat for pre-2.10
+                        tasks[obj["task_id"]] = 
SerializedBaseOperator.deserialize_operator(obj)

Review Comment:
   Don’t we always require (?) reserialising when Airflow is upgraded? This 
wouldn’t be needed if that’s the case.



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