ashb commented on a change in pull request #20931:
URL: https://github.com/apache/airflow/pull/20931#discussion_r787578055
##########
File path: airflow/serialization/serialized_objects.py
##########
@@ -970,6 +997,14 @@ def deserialize_dag(cls, encoded_dag: Dict[str, Any]) ->
'SerializedDAG':
if serializable_task.subdag is not None:
setattr(serializable_task.subdag, 'parent_dag', dag)
+ if isinstance(task, MappedOperator):
+ for d in (task.mapped_kwargs, task.partial_kwargs):
+ for k in d:
+ if not isinstance(d[k], _XcomRef):
+ continue
+
+ d[k] = XComArg(operator=dag.get_task(d[k].task_id),
key=d[k].key)
Review comment:
Oh yes, probably. Last night I was thinking we can't change the dict in
place, but that's only the case for adding/removing items, but changing
existing ones will be fine.
--
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]