Skip to content

Taskgroups show incorrect status in grid view #24998

@pascal-knapen

Description

@pascal-knapen

Apache Airflow version

2.3.2

What happened

Once a task belonging to a TaskGroup is in the status failed or upstream failed, that status is shown for the TaskGroup over all the runs in grid view.

What you think should happen instead

I expect in the grid view to see TaskGroups in the status corresponding to the status of the tasks in that group for the given dag run.

How to reproduce

  1. Create a DAG using taskgroups
from airflow import DAG
from airflow.utils.task_group import TaskGroup
from airflow.operators.empty import EmptyOperator
from datetime import datetime, timedelta


default_args = {
    "depends_on_past": False,
    "start_date": datetime(year=2022, month=7, day=9),
    "email": [],
    "email_on_failure": False,
    "email_on_retry": False,
    "retries": 0,
    "retry_delay": timedelta(minutes=5),
}

with DAG(
    "sample-taskgroup", default_args=default_args, schedule_interval="@daily", max_active_runs=1
) as dag: 

    t0 = EmptyOperator(task_id='start')

    # Start Task Group definition
    with TaskGroup(group_id='group1') as tg1:
        t1 = EmptyOperator(task_id='task1')
        t2 = EmptyOperator(task_id='task2')

        t1 >> t2
    # End Task Group definition
        
    t3 = EmptyOperator(task_id='end')

    # Set Task Group's (tg1) dependencies
    t0 >> tg1 >> t3
  1. Change the status of one of the tasks in the taskgroup
airflow_taskgroup_status.mov

Operating System

Debian GNU/Linux 11 (bullseye)

Versions of Apache Airflow Providers

N/A

Deployment

Other Docker-based deployment

Deployment details

N/A

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    affected_version:2.3Issues Reported for 2.3area:UIRelated to UI/UX. For Frontend Developers.kind:bugThis is a clearly a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions