jason810496 opened a new pull request, #64615:
URL: https://github.com/apache/airflow/pull/64615
* closes: #64613
* related: #64598
## Why
Trigger kwargs stored in the old serialization format (e.g., `{"__type":
"tuple", "__var": [1, 2]}`) fail to deserialize because `_convert` preserves
the short type name
(`"tuple"`) while the serde deserializer only recognizes fully-qualified
names (`"builtins.tuple"`), causing an `ImportError` that cascades into a
`KeyError` on the
`BaseSerialization` fallback path.
## What
- Add `OLD_TYPE_TO_QUALNAME` dict to shared/serialization mapping `tuple` ->
`builtins.tuple`, `set` -> `builtins.set`, `frozenset` -> `builtins.frozenset`,
`timedelta` -> `datetime.timedelta`
- Update `_convert` in `task-sdk/src/airflow/sdk/serde/__init__.py` to
resolve old type names via the mapping before constructing the new-format dict
- Add tests for old-format deserialization of builtin collections (`tuple`,
`set`, `frozenset`), nested old-format tuples inside dicts, and old-format
`timedelta`
##### Was generative AI tooling used to co-author this PR?
- [x] Yes (please specify the tool below)
--
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]