techolga commented on issue #40196:
URL: https://github.com/apache/airflow/issues/40196#issuecomment-2266044380

   Hi,
   I was just going to open a similar issue when I found this one. In my 
opinion it is not very intuitive when the execution behavior changes depending 
on the existence of a return statement. As a user I would expect that return 
statement has no influence on the execution order of the upstream tasks.
   
   Another case I came across is the following:
   
   Here I can not make that my files preparation is complete before the 
execution starts.
   
![image](https://github.com/user-attachments/assets/81fd2b91-1f4c-4ec7-bb70-90c6c206f26b)
   
   If I would daisy chain the file_list through the last task of the task_group 
and return that, then I can not have upstream dependencies anymore.
   
![image](https://github.com/user-attachments/assets/39e6c0ec-f2f9-4ab6-a8c0-5d16d982743d)
   
   Not returning the file_list from the task_group is not a good option because 
in my case the task_group is a function of a common package that is used in 
multiple nested task_groups and its hard to find the right ID to access it 
through xcom.pull.
   
   Thanks @potiuk for the idea of returning multiple tasks, thats more 
convenient than my previous workaround.
   
   I am not sure about the implications, but for me something like a 
`depend_on_upstream` argument added to the task_group would make it possible to 
solve all issues. This could then implicitly return the first task as well as 
whatever task is explicitly returned. Or being ignored if no task is explicitly 
returned. 
   


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