Under which category would you file this issue?
Providers
Apache Airflow version
3.2.0 (also reproduced on 3.2.1)
What happened and how to reproduce it?
Branching inside a TaskGroup does not reliably prevent non-selected downstream tasks from running.
Even when branch callable returns a specific task_id, sibling downstream tasks still get scheduled/run.
In our production setup (KubernetesExecutor), this causes unnecessary pod starts and resource waste.
Minimal example (TaskFlow + TaskGroup + branch):
from airflow.sdk import DAG, task, task_group
from airflow.providers.standard.operators.empty import EmptyOperator
from airflow.sdk.bases.operator import chain
from pendulum import datetime
with DAG(
dag_id="repro_branch_taskgroup_32x",
start_date=datetime(2026, 1, 1),
schedule=None,
catchup=False,
):
@task_group(group_id="g")
def g():
@task.branch(task_id="choose")
def choose():
return "g.path_a"
@task(task_id="path_a")
def path_a():
print("A")
@task(task_id="path_b")
def path_b():
print("B should be skipped")
end = EmptyOperator(task_id="end")
c = choose()
a = path_a()
b = path_b()
chain(c, [a, b], end)
g()
What you think should happen instead?
Only selected downstream branch task(s) should run.
All non-selected downstream tasks should be marked skipped before execution.
Operating System
No response
Deployment
Official Apache Airflow Helm Chart
Apache Airflow Provider(s)
No response
Versions of Apache Airflow Providers
No response
Official Helm Chart version
1.18.0
Kubernetes Version
v1.32.4
Helm Chart configuration
No response
Docker Image customizations
No response
Anything else?
Environment
Executor: KubernetesExecutor
Python: 3.13
Deployment: Docker/Kubernetes
DAG contains TaskGroup and mapped workloads in real case
Are you willing to submit PR?
Code of Conduct
Under which category would you file this issue?
Providers
Apache Airflow version
3.2.0 (also reproduced on 3.2.1)
What happened and how to reproduce it?
Branching inside a TaskGroup does not reliably prevent non-selected downstream tasks from running.
Even when branch callable returns a specific task_id, sibling downstream tasks still get scheduled/run.
In our production setup (KubernetesExecutor), this causes unnecessary pod starts and resource waste.
Minimal example (TaskFlow + TaskGroup + branch):
What you think should happen instead?
Only selected downstream branch task(s) should run.
All non-selected downstream tasks should be marked skipped before execution.
Operating System
No response
Deployment
Official Apache Airflow Helm Chart
Apache Airflow Provider(s)
No response
Versions of Apache Airflow Providers
No response
Official Helm Chart version
1.18.0
Kubernetes Version
v1.32.4
Helm Chart configuration
No response
Docker Image customizations
No response
Anything else?
Environment
Executor: KubernetesExecutor
Python: 3.13
Deployment: Docker/Kubernetes
DAG contains TaskGroup and mapped workloads in real case
Are you willing to submit PR?
Code of Conduct