ashb commented on a change in pull request #20743:
URL: https://github.com/apache/airflow/pull/20743#discussion_r784879013
##########
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:
I'f changed this slightly to:
```
try:
setattr(op, k, k)
except AttributeError:
# Read only value, update in place
getattr(op, k).update(v)
```
still a bit hacky, but marginally less so. I'll revisit this in the future.
--
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]