bolkedebruin commented on code in PR #29019:
URL: https://github.com/apache/airflow/pull/29019#discussion_r1142421730
##########
airflow/serialization/serde.py:
##########
@@ -207,19 +216,22 @@ def deserialize(o: T | None, full=True, type_hint: Any =
None) -> object:
if CLASSNAME in o and VERSION in o:
Review Comment:
No, as a provided serialized classname overrides the type_hint. It really is
a hint, we don't force the conversion. It is provided here for when we move the
old serialization (DAGs) to the new serialization. The old serialization
doesn't store type information for the top-level object (e.g. a serialized dag)
so the code allows us to have:
```
s_dag = serialize(dag, type_hint=SerializedDAG)
```
and have proper versioning working and keep backwards compatibility. But
both `classname` and `version` need to be present in order for this to be true.
The new format stipulates the use of 'VERSION' hence we know what we are
dealing with.
--
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]