Skip to content

Commit 40b697d

Browse files
committed
Apply topological sort on task group grid
1 parent 96c6daa commit 40b697d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

airflow-core/src/airflow/utils/task_group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def task_group_to_dict(task_item_or_group, parent_group_is_mapped=False):
6363
is_mapped = isinstance(task_group, MappedTaskGroup)
6464
children = [
6565
task_group_to_dict(child, parent_group_is_mapped=parent_group_is_mapped or is_mapped)
66-
for child in sorted(task_group.children.values(), key=lambda t: t.label)
66+
for child in task_group.topological_sort()
6767
]
6868

6969
if task_group.upstream_group_ids or task_group.upstream_task_ids:

0 commit comments

Comments
 (0)