ashb commented on a change in pull request #20743:
URL: https://github.com/apache/airflow/pull/20743#discussion_r781161629
##########
File path: airflow/serialization/serialized_objects.py
##########
@@ -653,10 +677,14 @@ def deserialize_operator(cls, encoded_op: Dict[str, Any])
-> BaseOperator:
v = cls._deserialize(v)
# else use v as it is
- setattr(op, k, v)
+ if hasattr(op, k) and isinstance(v, set):
+ getattr(op, k).update(v)
Review comment:
```python
@property
def upstream_task_ids(self) -> Set[str]:
"""@property: set of ids of tasks directly upstream"""
return self._upstream_task_ids
@property
def downstream_task_ids(self) -> Set[str]:
"""@property: set of ids of tasks directly downstream"""
return self._downstream_task_ids
```
Those can't be written but to the value of the set is mutable. So it's
related to the `downstream_task_ids` vs `_downstream_task_ids` -- I think the
change might be to make `downstream_task_id` a normal set attribute on
BaseOperator (rather than have `_downstream_task_ids` on MappedOperator) -- I
don't like storing/accessing the "private" fields here.
I'll see if that can be done without breaking the old serialization format.
--
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]