Fix airflowctl dagrun list limit handling (#64066)#64306
Closed
deepujain wants to merge 1 commit into
Closed
Conversation
Contributor
Author
|
Closing this as duplicate of #64071. |
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.
Summary
airflowctl dagrun listwas using the shared list paginator, which kept fetching and appending additional pages until it returned every matching run. That made--limitbehave like a page size instead of a hard cap. This change makes DAG run listing return exactly the requested page and preserves the limit the user asked for.Changes
airflow-ctl/src/airflowctl/api/operations.py-- changedDagRunOperations.list()to make a single API request and return the server response directly, so--limitis honored as the final result cap.airflow-ctl/tests/airflow_ctl/api/test_operations.py-- added a regression test that verifies DAG run listing does not paginate past the first page whenlimit=1.Test plan
uv run --project /Users/dejain/nvidia/oss/airflow-64066/airflow-ctl ruff check /Users/dejain/nvidia/oss/airflow-64066/airflow-ctl/src/airflowctl/api/operations.py /Users/dejain/nvidia/oss/airflow-64066/airflow-ctl/tests/airflow_ctl/api/test_operations.pyuv run --project /Users/dejain/nvidia/oss/airflow-64066/airflow-ctl ruff format --check /Users/dejain/nvidia/oss/airflow-64066/airflow-ctl/src/airflowctl/api/operations.py /Users/dejain/nvidia/oss/airflow-64066/airflow-ctl/tests/airflow_ctl/api/test_operations.pyuv run --project /Users/dejain/nvidia/oss/airflow-64066/airflow-ctl pytest /Users/dejain/nvidia/oss/airflow-64066/airflow-ctl/tests/airflow_ctl/api/test_operations.py::TestDagRunOperations -xvsFixes #64066