Pad71 opened a new issue, #56874: URL: https://github.com/apache/airflow/issues/56874
### Apache Airflow version 3.1.0 ### If "Other Airflow 2/3 version" selected, which one? _No response_ ### What happened? When a DAG contains one or more Task Groups, the task ordering in the Grid View becomes inconsistent or incorrect. Tasks are not displayed in the same order as they are defined in the DAG file. This makes the visual representation confusing — execution order and dependencies are correct, but the UI order in the GridView does not match the DAG definition. For example (code bellow), the expected sequential order of tasks is START_PROC → GRP_PROC → FINISH_PROC, but in Grid View they appear in the wrong order (see the screenshot below). <img width="472" height="238" alt="Image" src="https://github.com/user-attachments/assets/5e42eedb-42cc-4ab3-b11a-8d71e58ff46d" /> I also tested it with a standard Task Group definition ( with TaskGroup(group_id... ) and with dependencies defined using the .set_upstream syntax. Code: ``` from datetime import datetime, timedelta from airflow import DAG from airflow.operators.empty import EmptyOperator from airflow.sdk import task_group with DAG( dag_id="TASK_GROUP_TEST", schedule = None, start_date = datetime(2025, 10, 15), ) as dag: START_PROC = EmptyOperator( task_id = 'START_PROC', trigger_rule = "none_failed", ) @task_group(group_id="GRP_PROC") def GRP_PROC(): TEST_TASK = EmptyOperator( task_id = 'TEST_TASK', trigger_rule = "none_failed", ) TEST_TASK2 = EmptyOperator( task_id = 'TEST_TASK2', trigger_rule = "none_failed", ) TEST_TASK2.set_upstream(TEST_TASK) tgi_GRP_PROC = GRP_PROC() FINISH_PROC = EmptyOperator( task_id = 'FINISH_PROC', trigger_rule = "none_failed", ) START_PROC >> tgi_GRP_PROC >> FINISH_PROC ``` ### What you think should happen instead? the expected sequential order of tasks is START_PROC → GRP_PROC → FINISH_PROC ### How to reproduce Deploy this Dag and look at the GridView ``` from datetime import datetime, timedelta from airflow import DAG from airflow.operators.empty import EmptyOperator from airflow.sdk import task_group with DAG( dag_id="TASK_GROUP_TEST", schedule = None, start_date = datetime(2025, 10, 15), ) as dag: START_PROC = EmptyOperator( task_id = 'START_PROC', trigger_rule = "none_failed", ) @task_group(group_id="GRP_PROC") def GRP_PROC(): TEST_TASK = EmptyOperator( task_id = 'TEST_TASK', trigger_rule = "none_failed", ) TEST_TASK2 = EmptyOperator( task_id = 'TEST_TASK2', trigger_rule = "none_failed", ) TEST_TASK2.set_upstream(TEST_TASK) tgi_GRP_PROC = GRP_PROC() FINISH_PROC = EmptyOperator( task_id = 'FINISH_PROC', trigger_rule = "none_failed", ) START_PROC >> tgi_GRP_PROC >> FINISH_PROC ``` ### Operating System Windows 11 , Docker ### Versions of Apache Airflow Providers _No response_ ### Deployment Official Apache Airflow Helm Chart ### Deployment details _No response_ ### Anything else? _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
