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


##########
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:
   note also that if we merge this PR with these changes, then we can remove 
this logic in other pr : 
https://github.com/apache/airflow/pull/38567/files#diff-807ca0a4fd53aeb41166621c9842b0f89b7931fc64e9a60befa36c776db45efaR664



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