airflow
airflow copied to clipboard
Allow Task Group Ids to be passed as branches in BranchMixIn
This PR allows TaskGroup(s) to be passed as branch
in the operators that use BranchMixIn
.
With this implementation, if the provided string is a task_group_id
instead of task_id
, it will be expanded into the roots of that Task Group
, as suggested here.
I would greatly appreciate any feedback and would love to work on it more!
Closes: https://github.com/apache/airflow/issues/34526
As an additional question or note:
I am not sure if I should modify the docstring of the following operators:
- BaseBranchOperator
- BranchPythonOperator
- BranchPythonVirtualenvOperator
- BranchExternalPythonOperator
- BranchDateTimeOperator
- LatestOnlyOperator
- BranchDayOfWeekOperator
They all mention single task_id or list of task_ids to follow. However, with this PR, they all start to support "single task_id, single task_group_id, and list of combination of task_ids and task_group_ids".
Tests are failing. Can you fix them?
There’s a test case needs fixing.
As an additional question or note:
I am not sure if I should modify the docstring of the following operators:
- BaseBranchOperator
- BranchPythonOperator
- BranchPythonVirtualenvOperator
- BranchExternalPythonOperator
- BranchDateTimeOperator
- LatestOnlyOperator
- BranchDayOfWeekOperator
They all mention single task_id or list of task_ids to follow. However, with this PR, they all start to support "single task_id, single task_group_id, and list of combination of task_ids and task_group_ids".
Lets please