Migration fails on XCom table due to invalid JSONB conversion with NaN
values
#51178
Open
1 of 2 tasks
Labels
area:core
area:db-migrations
PRs with DB migration
kind:bug
This is a clearly a bug
needs-triage
label for new issues that we didn't triage yet
priority:medium
Bug that should be fixed before next release but would not block a release
Uh oh!
There was an error while loading. Please reload this page.
Apache Airflow version
3.0.1
If "Other Airflow 2 version" selected, which one?
No response
What happened?
During a database migration (from 2.10.2 to 3.0.1) the migration fails when attempting to cast the value column in the xcom table to JSONB. The root cause is the presence of
NaN
values in pickled data, which is not valid JSON and cannot be cast to JSONB.What you think should happen instead?
Instead of failing the migration, the process should gracefully handle non-migratable pickled values like
NaN
. These could be replaced with a placeholder (e.g., null or a specific string like "UNSUPPORTED_VALUE(NaN)") to indicate non-migratable content. This would allow the migration to proceed without data loss, while still flagging problematic entries for further inspection if needed.How to reproduce
Have a XCOM value that has NaN in it in a dict.
Operating System
docker / slim
Versions of Apache Airflow Providers
No response
Deployment
Official Apache Airflow Helm Chart
Deployment details
docker-compose, nothing special, the same
Anything else?
stack trace:
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: