fix(rest-api): Add order_by query param to TI listing APIs (#41283) (…#41647
Closed
pierrejeambrun wants to merge 1 commit intoapache:v2-10-testfrom
Closed
fix(rest-api): Add order_by query param to TI listing APIs (#41283) (…#41647pierrejeambrun wants to merge 1 commit intoapache:v2-10-testfrom
pierrejeambrun wants to merge 1 commit intoapache:v2-10-testfrom
Conversation
) (apache#41307) * fix(rest-api): Add order_by query param to TI listing APIs (apache#41283) This adds db-level sorting with order_by query param to the following TI listing APIs: 1. List task instances - /api/v1/dags/~/dagRuns/~/taskInstances 2. List task instances (batch) - /api/v1/dags/~/dagRuns/~/taskInstances/list order_by defaults to sorting by start_date (ascending) for above mentioned 2 APIs. Please note that this does NOT change the default sorting param for the List mapped task instances API. This also adds corresponding unit tests. * Raise ValueError for unsupported order_by values * Update docs for order_by * Add TaskInstanceOrderBy for TI APIs * Fix comment indentation * Minor refines --------- Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com> (cherry picked from commit b3d73af)
Member
Author
|
Wait, that's targeted for airflow 3.0 so there is nothing to backport I suppose. Closing. (Unless we want to consider it a bugfix cf the issue associated to it, and make that fix available for 2.11.0). @jedcunningham @bbovenzi what do you think ? |
Member
|
👍 Yep, not a bugfix imo. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…#41307)
This adds db-level sorting with order_by query param to the following TI listing APIs:
/dagRuns//taskInstances/dagRuns//taskInstances/listorder_by defaults to sorting by start_date (ascending) for above mentioned 2 APIs. Please note that this does NOT change the default sorting param for the List mapped task instances API.
This also adds corresponding unit tests.
Raise ValueError for unsupported order_by values
Update docs for order_by
Add TaskInstanceOrderBy for TI APIs
Fix comment indentation
Minor refines
Co-authored-by: Tzu-ping Chung uranusjr@gmail.com
(cherry picked from commit b3d73af)
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.