Skip to content

ParamsDict represents the class object itself, not keys and values on Task Instance Details #25295

Closed

Description

@hwooson12

Apache Airflow version

2.3.3 (latest released)

What happened

ParamsDict's printable presentation shows the class object itself like <airflow.models.param.ParamsDict object at 0x7fd0eba9bb80> on the page of Task Instance Detail because it does not have __repr__ method in its class.

image

It used to be dict object and what keys and values Params include are shown on UI before replacing Params with the advanced Params by #17100.

What you think should happen instead

It was originally shown below when it was dict object.

image

I think it can be fixed by adding __repr__ method to the class like below.

class ParamsDict(dict):
    ...
    def __repr__(self):
        return f"{self.dump()}"

How to reproduce

I guess it all happens on Airflow using 2.2.0+

Operating System

Linux, but it's not depending on OS

Versions of Apache Airflow Providers

No response

Deployment

Other

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

Activity

  1. self-assigned this
    on Jul 26, 2022
  2. added a commit that references this issue on Jul 27, 2022
    df388a3
  3. added a commit that references this issue on Aug 15, 2022
    de68fd1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions