This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v3-0-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-0-test by this push:
     new ceee1b940ad [v3-0-test] Add default ordering by map_index to patch TI 
API (#50722) (#50725)
ceee1b940ad is described below

commit ceee1b940add7f46d1e076e391fb5f92c937e985
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sat May 17 09:23:32 2025 -0400

    [v3-0-test] Add default ordering by map_index to patch TI API (#50722) 
(#50725)
    
    * Fix flaky test: 
test_set_note_should_respond_200_mapped_task_summary_with_rtif
    
    * Add default ordering by map_index to patch TI API
    (cherry picked from commit df2ac5020545b2d89b15f2a65cc5c99c0153f7b0)
    
    Co-authored-by: Amogh Desai <[email protected]>
---
 .../src/airflow/api_fastapi/core_api/routes/public/task_instances.py    | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py 
b/airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py
index 715c15ed4e1..9e61ed545be 100644
--- 
a/airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py
+++ 
b/airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py
@@ -746,6 +746,8 @@ def _patch_ti_validate_request(
         query = query.where(or_(TI.map_index == -1, TI.map_index is None))
     else:
         query = query.where(TI.map_index == map_index)
+    else:
+        query = query.order_by(TI.map_index)
 
     try:
         ti = session.scalar(query)

Reply via email to