uranusjr commented on code in PR #76826:
URL: https://github.com/apache/airflow/pull/76826#discussion_r4664531724


##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/xcoms.py:
##########
@@ -608,15 +678,30 @@ def get_xcom(
                 ),
             },
         )
+    if map_index is None:
+        mapped_read = _build_xcom_read(
+            dag_id=dag_id,
+            run_id=run_id,
+            task_id=task_id,
+            key=key,
+            session=session,
+            resolver=resolver,
+            token=token,
+            include_prior_dates=params.include_prior_dates,
+            previous_iteration=params.previous_iteration,
+            sequence=True,
+        )
+        values = _read_xcom_slice(mapped_read, start=None, stop=None, 
step=None, session=session)
+        return XComResponse(key=key, value=values)

Review Comment:
   I experimented with a few options and ultimately settled on the decision we 
probably shouldn’t overload this endpoint. Now, instead of trying to be smart 
on the endpoint, the get-task-result endpoint would simply redirect to the 
slice endpoint if the task being queried in mapped. Some additional code is 
added to the SDK to keep the beiavor unchanged.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to