insomnes commented on code in PR #46728:
URL: https://github.com/apache/airflow/pull/46728#discussion_r1962341277
##########
task_sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -270,13 +271,19 @@ def xcom_pull(
:param run_id: If provided, only pulls XComs from a DagRun w/a
matching run_id.
If *None* (default), the run_id of the calling task is used.
+
When pulling one single task (``task_id`` is *None* or a str) without
- specifying ``map_indexes``, the return value is inferred from whether
- the specified task is mapped. If not, value from the one single task
- instance is returned. If the task to pull is mapped, an iterator (not a
- list) yielding XComs from mapped task instances is returned. In either
- case, ``default`` (*None* if not specified) is returned if no matching
- XComs are found.
+ specifying ``map_indexes``, the return value is a single XCom entry
+ (map_indexes is set to map_index of the calling task instance).
+
+ When pulling task is mapped the specified ``map_index`` is used, so by
default
+ pulling on mapped task will result in no matching XComs if the task
instance
+ of the method call is not mapped. Otherwise the map_index of the
calling task
+ instance is used. Setting ``map_indexes`` to *None* will pull XCom as
from
+ not mapped task.
Review Comment:
Changed as requested
--
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]