ardubev16 opened a new issue, #36345: URL: https://github.com/apache/airflow/issues/36345
### Apache Airflow version 2.8.0 ### If "Other Airflow 2 version" selected, which one? _No response_ ### What happened? The code below, in the "How to reproduce" section, produces the following DAG, I think there is an extra connection rendered between `test_task` and `outer_end`.  ### What you think should happen instead? I would expect that `middle_end` is executed after `test_group` and, that `outer_end` is executed after `test_group2`. Since `inner_end` is a teardown task it is not considered a leaf of `test_group`, thus the only leaf of `test_group` is `test_task`. So, I would expect only the connection between `test_task` and `middle_end`, and **not** the connection between `test_task` and `outer_end`. ### How to reproduce Just decorate the following function to become a DAG: ```python def nesting_groups_test(): @task def test_task(): print("Hello world!") @task_group def test_group(): inner_start = EmptyOperator(task_id="inner_start") inner_end = EmptyOperator(task_id="inner_end") test_task_r = test_task() inner_start >> test_task_r >> inner_end.as_teardown(setups=inner_start) @task_group def test_group2(): middle_end = EmptyOperator(task_id="middle_end") test_group_r = test_group() test_group_r >> middle_end outer_start = EmptyOperator(task_id="outer_start") outer_end = EmptyOperator(task_id="outer_end") test_group2_r = test_group2() outer_start >> test_group2_r >> outer_end ``` ### Operating System Ubuntu 22.04.3 LTS ### Versions of Apache Airflow Providers _No response_ ### Deployment Docker-Compose ### Deployment details _No response_ ### Anything else? This seems to be just a rendering issue since I've done some simple tests and the tasks have been executed in order, but I'm not 100% sure. ### 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]
