You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2024/01/30 08:30:48 UTC

[PR] Order XCom entries by map index in API [airflow]

uranusjr opened a new pull request, #37086:
URL: https://github.com/apache/airflow/pull/37086

   This makes the resulting list more stable.
   
   I found this in a failed CI run: https://github.com/apache/airflow/actions/runs/7698956149/job/20980348665
   
   While it is technically possible to just fix this in the tests, I feel it is better to make the list returned by the API have a stable ordering since this is useful in general anyway.
   


-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Order XCom entries by map index in API [airflow]

Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr commented on code in PR #37086:
URL: https://github.com/apache/airflow/pull/37086#discussion_r1470778761


##########
airflow/api_connexion/endpoints/xcom_endpoint.py:
##########
@@ -71,7 +71,7 @@ def get_xcom_entries(
         query = query.where(XCom.map_index == map_index)
     if xcom_key is not None:
         query = query.where(XCom.key == xcom_key)
-    query = query.order_by(DR.execution_date, XCom.task_id, XCom.dag_id, XCom.key)
+    query = query.order_by(DR.execution_date, XCom.task_id, XCom.map_index, XCom.dag_id, XCom.key)

Review Comment:
   By the way I’m not quite sure why we order this way. Normally I’d order by dag_id before task_id?



-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org