-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AIP-84 | Add multisort to dags list request #46383
Comments
Nice. For now the When we use a descending sort, the secondary filter (which is the primary key of the table, here the In the following code airflow/airflow/api_fastapi/common/parameters.py Lines 202 to 205 in ee6bd7e
I think we need to support multisort to be able to handle this case. Users would be able to specify that they want to sort on the primary criteria in asc(), but on a secondary criteria in desc() order for intance. (Or any other arbitrary combination). |
Hey can work on this. |
Great, assigned ! |
Hello @pierrejeambrun, Are both front-end and back-end changes being done by the assignee? |
Hello @prasad-madine, I assume so. We need the backend contribution to start working on the front-end anyway. @Vishnu-sai-teja any progress ? Do you have plan on following up with the front-end changes as well ? |
Hey out of town, haven't started on it yet, Sorry I should have informed earlier |
The UI part should be fairly straightforward: https://tanstack.com/table/latest/docs/guide/sorting#multi-sorting |
Hello @pierrejeambrun , Option 1
Option 2
Could you please advise on which option would be more appropriate or effective in this context? |
I would say option 1. The sort param would be passed in the url like so: The primary sort should be the first order_by param passed. Secondary sort, the second param. |
That's also what I had in mind. |
Hello @bbovenzi @pierrejeambrun , I've implemented the backend code in below PR, Could you please review that. |
Hello @bbovenzi @pierrejeambrun ! I'm a senior CS and engineering student and i would love to contribute to the frontend part of this issue for a project for one of my final classes. Would that be possible? |
@mariana-marcal-santana you can follow along the backend change #47440. @prasad-madine were you planning on following up with the frontend once you are done with the backend or do you want @mariana-marcal-santana to take this work ? |
Yeah @mariana-marcal-santana can work on frontend portion. |
@mariana-marcal-santana you'r also assigned |
…bug-add-multisort-to-dags-list-request-apache#46383
Hello @bbovenzi @pierrejeambrun ! I've been working on the frontend of this issue and I believe I'm in the right track to solve it. However, I have a few things that I would like to confirm. As seen in the picture, the DAGs should be sorted firstly by "last_run_start_date" (OK) and secondly by "-dag_id" (not OK) because they appear sorted by "dag_id". Given this, I'm not sure where my implementation could be going wrong or if it's something related to the backend. @prasad-madine sorry to bother but could you take a look into this case please? |
Frontend: Implement multisort for DAGs when displayed in a table; The URL displays extra sorting attributes when Shift+"click" is used on the column to sort by.
Frontend: Implement multisort for DAGs when displayed in a table; The URL displays extra sorting attributes when Shift+click is used on the column to sort by. This implements the UI portion of apache#46383
@mariana-marcal-santana Thanks, looking good. #47859 (backend) has not been merged into main yet, are you building your PR on top of #47859 ? Otherwise you will need to wait for the backend to be completed (it is not supported yet). |
Indeed, in the url we use |
For the multisort to fully work it needs the #47440's backend but I tested locally my changes by themselves and they don't break the platform even without the corresponding backend. I don't mind waiting for the backend and if anything is needed I would be happy to help! Also, maybe I didn't fully understand the question but I don't know much about the PR mentioned in the comment and if it has any effect on mine... |
Thanks for clearing that out! |
Frontend: Implement multisort for DAGs when displayed in a table; The browser and backend URLs display extra sorting attributes when Shift+click is used on the column to sort by.
Frontend: Implement multisort for DAGs when displayed in a table; The browser and backend URLs display extra sorting attributes when Shift+click is used on the column to sort by. This implements the UI portion of apache#46383
…bug-add-multisort-to-dags-list-request-apache#46383
Hello @bbovenzi @pierrejeambrun ! |
Hello @mariana-marcal-santana, Sorry for the delay, I just did a review, it will be easier to test and iterate once the backend is merged, we're working on that. |
In the UI, we default the dags list to show dags with the latest dag run first , which we pass as
-last_dag_run_start_date
. Problem is that the minus symbol seems to make the default sorts also reverse so any dags without a dag run will be in reverse alphabetical order which is counterintuitive for users.If you reverse the dag run start date order, it will also change the alphabetical order.
The text was updated successfully, but these errors were encountered: