badrisrinivas9 opened a new issue, #30021:
URL: https://github.com/apache/airflow/issues/30021

   ### Apache Airflow version
   
   2.5.1
   
   ### What happened
   
   If we create two nested groups and expand the groups the second group tasks 
fail. I assume the second expand doesn't know which value of mapped index to 
take. 
   
![image](https://user-images.githubusercontent.com/114723574/224307242-f1eda991-7fa0-4afd-83df-0103ed52eb44.png)
   
   
   ### What you think should happen instead
   
   The second group should have got the value from the upstream from the first 
group(most probably by mapping value)
   
   ### How to reproduce
   
   import pendulum
   
   from airflow.decorators import dag, task, task_group
   from airflow.operators.empty import EmptyOperator
   
   
   @dag(dag_id="test", start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
        schedule=None, catchup=False,
        render_template_as_native_obj=True
        )
   def generic_wrapper():
       task1 = EmptyOperator(task_id="task1")
       task2 = EmptyOperator(task_id="task2")
   
       @task
       def task3():
           return [1, 2, 3]
   
       @task_group(
           group_id="group2"
       )
       def group2(i):
           @task
           def task4(i):
               print(i)
   
           @task
           def task5():
               return [1, 2, 3]
   
           task4(i) >> group3.expand(x=task5())
   
       @task_group(
           group_id="group3"
       )
       def group3(x):
           @task
           def task6(x):
               print(x)
   
           task6(x)
   
       task1 >> task2 >> group2.expand(i=task3())
   
   
   dag = generic_wrapper()
   
   if __name__ == "__main__":
       dag.test()
   
   
   ### Operating System
   
   linux
   
   ### Versions of Apache Airflow Providers
   
   airflow 2.5.1
   
   ### Deployment
   
   Other
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### 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