Skip to content

Airflow CLI to list roles is slow #28242

Closed
@malthe

Description

Apache Airflow version

2.5.0

What happened

We're currently running a suboptimal setup where database connectivity is laggy, 125ms roundtrip.

This has interesting consequences. For example, airflow roles list is really slow. Turns out that it's doing a lot of individual queries.

What you think should happen instead

Ideally, listing roles should be a single (perhaps complex) query.

How to reproduce

We're using py-spy to sample program execution:

$ py-spy record -o spy.svg -i --rate 250 --nonblocking airflow roles list

Now, to see the bad behavior, the database should incur significant latency.

Operating System

Linux

Versions of Apache Airflow Providers

No response

Deployment

Official Apache Airflow Helm Chart

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

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions