henry3260 commented on code in PR #59104:
URL: https://github.com/apache/airflow/pull/59104#discussion_r2649034004
##########
airflow-core/src/airflow/models/taskinstance.py:
##########
@@ -1896,6 +1896,32 @@ def xcom_pull(
).first()
if first is None: # No matching XCom at all.
return default
+
+ # Check if the task is actually mapped
+ target_task_id = task_ids if isinstance(task_ids, str) else
first.task_id
+ is_actually_mapped = False
+
+ try:
+ # Get the task definition from the DAG
+ if self.task and self.task.dag:
+ dag = self.task.dag
+ if dag.has_task(target_task_id):
+ target_task = dag.task_dict[target_task_id]
+ is_actually_mapped = getattr(target_task, "is_mapped",
False)
Review Comment:
Thank you for pointing that out.
--
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]