kaxil commented on a change in pull request #16633:
URL: https://github.com/apache/airflow/pull/16633#discussion_r658027093
##########
File path: airflow/serialization/serialized_objects.py
##########
@@ -186,13 +186,17 @@ def serialize_to_json(
if cls._is_excluded(value, key, object_to_serialize):
continue
+ value = cls._serialize(value)
if key in decorated_fields:
- serialized_object[key] = cls._serialize(value)
- else:
- value = cls._serialize(value)
- if isinstance(value, dict) and "__type" in value:
- value = value["__var"]
- serialized_object[key] = value
+ pass
+ elif not (isinstance(value, dict) and "__type" in value):
+ pass
+ elif key in DAG.get_serialized_fields() |
BaseOperator.get_serialized_fields():
Review comment:
Currently, we already support overriding get_serialized_fields for a
BaseOperator and it should be taken for:
Example:
https://github.com/apache/airflow/blob/d181604739c048c6969d8997dbaf8b159607904b/airflow/sensors/external_task.py#L299-L304
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]