Skip to content

Extra links order is not predictable causing shuffling in UI during webserver restarts #32761

Description

@tirkarthi

Apache Airflow version

main (development)

What happened

Currently extra_links is a cached property that returns a list without any order since set is used. Since we have 3 links per operator this order gets shuffled during webserver restarts as reported by users. It would be good to have this sorted so that the order is predictable. This is already done in extra_links Airflow API output

@cached_property
def extra_links(self) -> list[str]:
return list(set(self.operator_extra_link_dict).union(self.global_operator_extra_link_dict))

all_extra_links = {
link_name: link_url if link_url else None for link_name, link_url in sorted(all_extra_link_pairs)
}
return all_extra_links

What you think should happen instead

extra link order should be predictable

How to reproduce

  1. Create an operator with 3 or more extra links.
  2. Render the links in UI.
  3. Restart the webserver and check the extra link order.

Operating System

Ubuntu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corekind:bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yet

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions