You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ardubev16 (via GitHub)" <gi...@apache.org> on 2023/12/21 10:02:02 UTC

[I] Setup/Teardown in nested Task Groups creating unwanted dependencies with downstream tasks [airflow]

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`.
   ![Screenshot from 2023-12-20 16-09-22](https://github.com/apache/airflow/assets/43483037/a96c96da-26b1-4e37-94fa-f771802f9e0f)
   
   
   ### 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: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Setup/Teardown in nested Task Groups creating unwanted dependencies with downstream tasks [airflow]

Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish commented on issue #36345:
URL: https://github.com/apache/airflow/issues/36345#issuecomment-1866651385

   Looks like bug, thanks.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Setup/Teardown in nested Task Groups creating unwanted dependencies with downstream tasks [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #36345:
URL: https://github.com/apache/airflow/issues/36345#issuecomment-1866140027

   CC: @dstandish - I might take a close look (I want to learn more about the setup/teardown implementation) - possibly after holidays but If you happen to be around and **know** by heart that could be also helpful :)


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Setup/Teardown in nested Task Groups creating unwanted dependencies with downstream tasks [airflow]

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #36345:
URL: https://github.com/apache/airflow/issues/36345#issuecomment-1865978492

   Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Setup/Teardown in nested Task Groups creating unwanted dependencies with downstream tasks [airflow]

Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish closed issue #36345: Setup/Teardown in nested Task Groups creating unwanted dependencies with downstream tasks
URL: https://github.com/apache/airflow/issues/36345


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org