Under which category would you file this issue?
Airflow Core
Apache Airflow version
3.2.0+astro.1
What happened and how to reproduce it?
When setting dependencies between a list of task groups and another task group, the grid does NOT render the task groups in topological order.
This is the Dag where the list of task groups is c and the singular task group is a.
import pendulum
from airflow.sdk import dag, task, TaskGroup
from airflow.providers.standard.operators.python import PythonOperator
@dag(
schedule=None,
start_date=pendulum.datetime(2026, 1, 1, tz="UTC"),
dag_id="grid",
)
def grid():
with TaskGroup(group_id="a") as a:
even = PythonOperator(task_id="get_even", python_callable=lambda: None)
odd = PythonOperator(task_id="get_odd", python_callable=lambda: None)
even >> odd
c = []
for x in range(3):
with TaskGroup(group_id=f"b_{x}") as b:
even = PythonOperator(task_id="get_even", python_callable=lambda: None)
odd = PythonOperator(task_id="get_odd", python_callable=lambda: None)
even >> odd
c.append(b)
c >> a
grid()
This is the graph render of the Dag.
This is the grid render of the Dag. Notice the task groups (b_0, b_1, and b_2) is BELOW the task group a.
What you think should happen instead?
When the dependencies are set between individual task groups, the grid view does render the task groups topologically. I expect this Dag to render the task groups in the same order as below.
import pendulum
from airflow.sdk import dag, task, TaskGroup
from airflow.providers.standard.operators.python import PythonOperator
@dag(
schedule=None,
start_date=pendulum.datetime(2026, 1, 1, tz="UTC"),
dag_id="grid",
)
def grid():
with TaskGroup(group_id="a") as a:
even = PythonOperator(task_id="get_even", python_callable=lambda: None)
odd = PythonOperator(task_id="get_odd", python_callable=lambda: None)
even >> odd
for x in range(3):
with TaskGroup(group_id=f"b_{x}") as b:
even = PythonOperator(task_id="get_even", python_callable=lambda: None)
odd = PythonOperator(task_id="get_odd", python_callable=lambda: None)
even >> odd
b >> a
grid()
This is the graph render of the Dag.
This is the grid render of the Dag. Notice the task groups (b_0, b_1, and b_2) is ABOVE the task group a.
Operating System
Debian GNU/Linux 13 (trixie)
Deployment
Astronomer
Apache Airflow Provider(s)
No response
Versions of Apache Airflow Providers
No response
Official Helm Chart version
Not Applicable
Kubernetes Version
No response
Helm Chart configuration
No response
Docker Image customizations
No response
Anything else?
I suspect this is related to #56963.
Are you willing to submit PR?
Code of Conduct
Under which category would you file this issue?
Airflow Core
Apache Airflow version
3.2.0+astro.1
What happened and how to reproduce it?
When setting dependencies between a list of task groups and another task group, the grid does NOT render the task groups in topological order.
This is the Dag where the list of task groups is
cand the singular task group isa.This is the graph render of the Dag.
This is the grid render of the Dag. Notice the task groups (
b_0,b_1, andb_2) is BELOW the task groupa.What you think should happen instead?
When the dependencies are set between individual task groups, the grid view does render the task groups topologically. I expect this Dag to render the task groups in the same order as below.
This is the graph render of the Dag.
This is the grid render of the Dag. Notice the task groups (
b_0,b_1, andb_2) is ABOVE the task groupa.Operating System
Debian GNU/Linux 13 (trixie)
Deployment
Astronomer
Apache Airflow Provider(s)
No response
Versions of Apache Airflow Providers
No response
Official Helm Chart version
Not Applicable
Kubernetes Version
No response
Helm Chart configuration
No response
Docker Image customizations
No response
Anything else?
I suspect this is related to #56963.
Are you willing to submit PR?
Code of Conduct