Skip to content

Custom registered serializers stopped working due to type changes #56215

@FrankPortman

Description

@FrankPortman

Apache Airflow version

3.1.0

If "Other Airflow 2 version" selected, which one?

No response

What happened?

The way classname gets resolved has changed, breaking custom deserialize calls.

Isolated the issue to these PRs:

Which mentions pydantic only but has a classname --> cls change for custom deserializers bundled in the commentary. The pydantic specific naming of the PRs made this difficult to debug when looking at git history.

The documentation also still shows comparing classname to qualname(...), as well as str type hints for classname. This also made it difficult to debug when poring over changes for 3.1.0.

What you think should happen instead?

Release notes and documentation (including this example, which is basically the only example of registering serializers: https://airflow.apache.org/docs/apache-airflow/stable/authoring-and-scheduling/serializers.html) should be updated if behavior changes, and this should have been listed as a significant/breaking change in 3.1.0 release notes.

How to reproduce

Use registered custom serializers and follow the official documentation for the deserialize function.

Operating System

Any

Versions of Apache Airflow Providers

No response

Deployment

Astronomer

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions