arjunanan6 opened a new issue, #31547: URL: https://github.com/apache/airflow/issues/31547
### Apache Airflow version Other Airflow 2 version (please specify below) ### What happened Airflow v: 2.6.0 This has been an issue since 2.4.0 for us at least. We recently did a refactor of many of our 160+ DAGs and part of that process was to remove some tags that we didn't want anymore. Unfortunately, the old tags were still left behind when we deployed our new image with the updated DAGs (been a consistent thing across several Airflow versions for us). There is also the issue that the tag filter doesn't sort our tags alphabetically. I tried to truncate the dag_tag table, and that did help to get rid of the old tags. However, the sorting issue remains. Example:  On one of our dev environments, we have just about 10 DAGs with a similar sorting problem, and the dag_tag table had 18 rows. I took a backup of it and truncated the dag_tag table, which was almost instantly refilled (I guess logs are DEBUG level on that, so I saw nothing). This did not initially fix the sorting problem, but after a couple of truncates, things got weird, and all the tags were sorted as expected, and the row count in the dag_tag table was now just 15, so 3 rows were removed in all. We also added a new DAG in there with a tag "arjun", which also got listed first - so all sorted on that environment. Summary: 1. Truncating of the dag_tag table got rid of the old tags that we no longer have in our DAGs. 2. The tags are still sorted incorrectly in the filter (see image). It seems that the logic here is contained in `www/static/js/dags.js.` I am willing to submit a PR if I can get some guidance :) ### What you think should happen instead _No response_ ### How to reproduce N/A ### Operating System debian ### 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? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
