mrn-aglic opened a new issue, #29067:
URL: https://github.com/apache/airflow/issues/29067

   ### Apache Airflow version
   
   2.5.0
   
   ### What happened
   
   I was trying to learn about the feature of using dynamic task group mapping. 
   However, whenever I try to run the DAG, I get the exception
   `airflow.models.expandinput.NotFullyPopulated: Failed to populate all 
mapping metadata; missing: 'my_num'`
   
   It might be a mistake on my side, or it might be related somehow to this 
issue: https://github.com/apache/airflow/issues/28973
   
   I should mention that I'm using LocalExecutor. 
   
   ### What you think should happen instead
   
   I think that I should get multiple instances of task group. Also, the 
parameters of the upstream task should be provided to the mapped TaskGroup 
instances.
   
   ### How to reproduce
   
   Here is a DAG example taken from Astronomer and modified a bit.
   
   ```
   import pendulum
   from airflow import DAG
   from airflow.decorators import task_group, task
   
   with DAG(
           dag_id="task_group_mapping_example",
           start_date=pendulum.now().subtract(hours=1),
           schedule="0 * * * *",
           description="This DAG demonstrates the use of task groups with 
dynamic task mapping",
           tags=["airflow2.5", "task_group_mapping"],
   ):
       @task_group(
           group_id="group1"
       )
       def tg1(my_num):
           @task
           def print_num(num):
               return num
   
           @task
           def add_42(num):
               s = num["start"]
               return s + 42
   
           add_42(print_num(my_num))
   
       @task
       def cde():
           return [{"start": 1}, {"start": 2}]
   
       res = cde()
       tg1_object = tg1.expand(my_num=res)
   ```
   
   
   ### Operating System
   
   Mac OS X
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   The problem occurs every time I try to run the DAG and the scheduler crashes.
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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