TJaniF commented on issue #47874:
URL: https://github.com/apache/airflow/issues/47874#issuecomment-2757305661

   Just reproduced with a simpler example
   
   ```
   from airflow.decorators import dag, task
   
   @dag()
   def simple_dynamic_task_mapping():
   
       @task   
       def get_nums():
           
           return [1,2,3]    #A
   
       @task
       def times_2(num):    #B
           return num * 2
   
       @task
       def add_10(num):    #C
           return num + 10
   
       _get_nums = get_nums()
       _times_2 = times_2.expand(num=_get_nums)    #D
       add_10.expand(num=_times_2)    #E
   
   
   simple_dynamic_task_mapping()    #F
   ```
   
   
   The times_2 instances fail with:
   
   ```
   [2025-03-27, 09:14:00] INFO - DAG bundles loaded: dags-folder: 
source="***.dag_processing.bundles.manager.DagBundlesManager"
   
   [2025-03-27, 09:14:00] INFO - Filling up the DagBag from /files/dags/dtm.py: 
source="***.models.dagbag.DagBag"
   
   [2025-03-27, 09:14:00] INFO - Done. Returned value was: 6: 
source="***.task.operators.***.decorators.python._PythonDecoratedOperator"
   
   [2025-03-27, 09:14:00] ERROR - Task failed with exception: source="task"
   UnmappableXComTypePushed: unmappable return type 'int'
   File "/opt/***/task-sdk/src/***/sdk/execution_time/task_runner.py", line 648 
in run
   
   File "/opt/***/task-sdk/src/***/sdk/execution_time/task_runner.py", line 934 
in _push_xcom_if_needed
   ```
   
   
   I think what is happening is that the add_10 task (the second dtm task) is 
not fetching the collected list of xcom from the times_2 dtm task instances, 
and instead maybe uses only one map_index? 


-- 
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