Skip to content

Xcom view broken for non-JSON values #42117

@jkramer-ginkgo

Description

@jkramer-ginkgo

Apache Airflow version

Other Airflow 2 version (please specify below)

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

2.10.1

What happened?

Non-JSON values are broken in the Xcom UI [screenshot attached]

Root cause is this line from #40640. Setting stringify: false results in JSON encoding which results in TypeError: keys must be str, int, float, bool or None, not tuple exception from GET <Airflow URL>/api/v1/dags/<DAG>/dagRuns/<Run ID>/taskInstances/<Task ID>/xcomEntries/<Xcom name>?stringify=false endpoint.

The PR's intention is to make the whole view JSON, so not sure if the intention is to error on non-JSON Xcom values, or if it should be updated to have clean fallback logic.

Pasted Graphic 22

[This is a dupe of #41981]

What you think should happen instead?

No response

How to reproduce

Create Xcom value that is non-JSON serializable (e.g. {('201009_NB502104_0421_AHJY23BGXG (SEQ_WF: 138898)', None): 82359}) and then try to view in UI Xcom tab

Operating System

Linux (Ubuntu 22.04)

Versions of Apache Airflow Providers

No response

Deployment

Virtualenv installation

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

No one assigned

    Labels

    area:UIRelated to UI/UX. For Frontend Developers.area:corearea:webserverWebserver related Issueskind:bugThis is a clearly a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions