uranusjr commented on code in PR #76825:
URL: https://github.com/apache/airflow/pull/76825#discussion_r4599692877
##########
task-sdk/src/airflow/sdk/bases/xcom.py:
##########
@@ -502,8 +503,10 @@ def get_one(
:param dag_id: Dag ID to pull the XCom from.
:param task_id: Task ID to pull the XCom from.
:param map_index: Map index of the task instance to pull the XCom from.
- *None* (default) pulls the XCom of a non-mapped task, which has
- map index ``-1``.
+ *None* (default) pulls the task's result: the XCom of a non-mapped
+ task, or for a mapped task the XComs of all its instances as a
+ list, the same values ``get_all`` returns. Airflow 3.4 returns
+ *None* instead of an empty list.
Review Comment:
Fixed. When the fallback finds a mapped task’s values, the supervisor now
answers with a slice result (same as for get_all) rather than one XComResult.
This gets unpacked at the client side. The triggerer accepts the slice result
too. I’ll do the server side in #76826 by having the server mark a mapped
answer.
--
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]