Skip to content
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 #47440

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

prasad-madine
Copy link

@prasad-madine prasad-madine commented Mar 6, 2025

Description:

In the current UI, the DAGs list is sorted by default to display DAGs with the most recent DAG run first, achieved by sorting with -last_dag_run_start_date. However, this approach leads to an unintended consequence: DAGs that have never been run are displayed in reverse alphabetical order, which can be counterintuitive for users. Additionally, reversing the order of last_dag_run_start_date also affects the alphabetical order of DAGs.

backend part of: #46383

  • Add support for multi sort in the API

Test cases screenshot

image (1)

@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label Mar 6, 2025
Copy link

boring-cyborg bot commented Mar 6, 2025

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: [email protected]
    Slack: https://s.apache.org/airflow-slack

@pierrejeambrun pierrejeambrun changed the title fix:bug Add multisort to dags list request #46383 AIP-84 Add multisort to dags list request #46383 Mar 6, 2025
@pierrejeambrun pierrejeambrun added the AIP-84 Modern Rest API label Mar 6, 2025
@pierrejeambrun pierrejeambrun added this to the Airflow 3.0.0 milestone Mar 6, 2025
Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for the pull request 🎉

I think we need:

  • To allow multi sorting on the get dags endpoint to solve the related issue.
  • Add tests for the get dags endpoint with multiple sort in the query and assert that it is doing what we expect.

Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, we need some tests too.

@pierrejeambrun
Copy link
Member

Don't hesitate to resolve comments that you have addressed. This will make the review easier, thanks.

@prasad-madine
Copy link
Author

Nice, we need some tests too.

Yes, currently working on that, will update the PR once it is done.
Thankyou

@prasad-madine
Copy link
Author

Don't hesitate to resolve comments that you have addressed. This will make the review easier, thanks.

I thought to do it after writing test cases.

@prasad-madine
Copy link
Author

Hi @pierrejeambrun , I have added few tests, COuld you please review it and let me know if any additional things to be required.
Thankyou

Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Looking good overall. One couple of comments only.

CI need fixing (tests, static check etc.), can you also rebase the branch solve conflicts.

@prasad-madine
Copy link
Author

@pierrejeambrun could you please review the PR, If any changes needs to be done, I'll address those.
Thankyou

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AIP-84 Modern Rest API area:API Airflow's REST/HTTP API
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants