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
- Create an operator with 3 or more extra links.
- Render the links in UI.
- 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?
Code of Conduct
Apache Airflow version
main (development)
What happened
Currently
extra_linksis 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 outputairflow/airflow/models/abstractoperator.py
Lines 470 to 472 in d7899ec
airflow/airflow/api_connexion/endpoints/extra_link_endpoint.py
Lines 75 to 78 in d7899ec
What you think should happen instead
extra link order should be predictable
How to reproduce
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?
Code of Conduct