DFINITYManu opened a new issue, #41283: URL: https://github.com/apache/airflow/issues/41283
### Apache Airflow version Other Airflow 2 version (please specify below) ### If "Other Airflow 2 version" selected, which one? 2.9.1 ### What happened? When using paged retrieval: ``` https://airflow/api/v1/dags/DAG/dagRuns/rc--2024-08-02_01-30/taskInstances?limit=100&offset=0 https://airflow/api/v1/dags/DAG/dagRuns/rc--2024-08-02_01-30/taskInstances?limit=100&offset=100 https://airflow/api/v1/dags/DAG/dagRuns/rc--2024-08-02_01-30/taskInstances?limit=100&offset=200 ``` the task instance results are unordered, ensuring with near certainty that all subsequent paged retrievals (with offset > 0) return some tasks already returned before, and fail to return tasks that should have been in the page. Thus, concatenating the tasks yields the correct *number* of tasks, but some are repeated and some are missing. Full retrieval as per ``` https://airflow/api/v1/dags/DAG/dagRuns/rc--2024-08-02_01-30/taskInstances?limit=300 ``` returns each task instance only once, and returns all task instances exhaustively. ### What you think should happen instead? Task instances from API call should either be returned in some specific order, or there should be a query string parameter allowing us users to specify a designated order (such as task instance creation / appearance date). ### How to reproduce Just issue a taskInstances GET call with a small limit, then with an offset equivalent to the small limit. Tasks that were on the first batch are likely to appear on the second batch too. ### Operating System Ubuntu 22.04 container ### Versions of Apache Airflow Providers Not relevant. ### Deployment Official Apache Airflow Helm Chart ### Deployment details We use a very vanilla Kubernetes. ### Anything else? Always. ### Are you willing to submit PR? - [ ] 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: commits-unsubscr...@airflow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org