-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow depending to a @task_group as a whole #20671
Allow depending to a @task_group as a whole #20671
Conversation
d45cfb3
to
8a89cea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love that this gets to parity with the context manager version of TaskGroups!
Instead of always using the task returned by the task group function as the dependency representation, also allow a task group function to *not* return any task specifically. Setting dependency to such a group would depend on the group's contained tasks as a whole.
3b3573c
to
3f5a523
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
Doesn't need to be in this PR but it might be nice to have some documentation on these two behaviors with the @uranusjr I can log a request for this if you don't want to take this up. Let me know. |
Actually looks like this would be all new documentation on the |
I created #20762 to track documentation changes. |
Fix #19903.
Instead of always using the task returned by the task group function as the dependency representation, also allow a task group function to not return any task specifically.
Setting dependency to such a group would depend on the group's contained tasks as a whole, and not any specific task in it.
This renders this DAG definition taken from #19903 (comment) (which would fail to parse currently)
like this:
Tests to come later.Done