Skip to content

Make serde errors for unsupported types a bit more actionable - #70974

Merged
amoghrajesh merged 2 commits into
apache:mainfrom
astronomer:better-error-message-serde
Aug 3, 2026
Merged

Make serde errors for unsupported types a bit more actionable#70974
amoghrajesh merged 2 commits into
apache:mainfrom
astronomer:better-error-message-serde

Conversation

@amoghrajesh

Copy link
Copy Markdown
Contributor

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Previously these errors said only that a type could not be (de)serialized, giving no indication of what to do about it.
Error looked like

TypeError: cannot serialize object of type <class 'pandas.DataFrame'>

Example in #70791

Name the two ways a Dag author can make their own class work

  • a serialize/deserialize method pair
  • or @dataclass/@attr.define)

and link to the docs page that already covers all the options in full, instead of leaving people to dig through source to find them.


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@Lee-W Lee-W left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread task-sdk/src/airflow/sdk/serde/__init__.py Outdated
Comment thread task-sdk/tests/task_sdk/serde/test_serde.py Outdated
Comment thread task-sdk/tests/task_sdk/serde/test_serde.py Outdated
Comment thread task-sdk/src/airflow/sdk/serde/__init__.py Outdated
@amoghrajesh
amoghrajesh requested a review from kaxil August 3, 2026 09:31
@amoghrajesh amoghrajesh added the backport-to-v3-3-test Backport to v3-3-test label Aug 3, 2026
@amoghrajesh
amoghrajesh merged commit b3cc48d into apache:main Aug 3, 2026
107 checks passed
@amoghrajesh
amoghrajesh deleted the better-error-message-serde branch August 3, 2026 12:06
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-3-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-3-test PR Link

github-actions Bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Aug 3, 2026
…able (apache#70974)

(cherry picked from commit b3cc48d)

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
aws-airflow-bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Aug 3, 2026
…able (apache#70974)

(cherry picked from commit b3cc48d)

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
@potiuk

potiuk commented Aug 3, 2026

Copy link
Copy Markdown
Member

nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants