Skip to content

Clearing a single task in a DAG run clearing all tasks #53066

@atul-astronomer

Description

@atul-astronomer

Apache Airflow version

3.0.3rc4

If "Other Airflow 2 version" selected, which one?

No response

What happened?

When user wants to clear a specific task, dailog box is showing all the tasks to be cleared.
This is happening because by default 'downstream' option is selected while clearing TI.

Image

Behaviour in 3.0.2

Image

What you think should happen instead?

No response

How to reproduce

Use the below Dag and make a dagrun, when dagrun is completed, select a task and try clearing it, dailog box should show only single task that we are trying to clear.

from airflow import AirflowException
from airflow.sdk import DAG
from airflow.decorators import task
from airflow.providers.standard.operators.bash import BashOperator
from airflow.exceptions import AirflowSkipException
from datetime import datetime, timedelta

with DAG(
    dag_id="expand_kwargs",
    doc_md="use expand_kwargs without a function",
    schedule=timedelta(days=30 * 365),
    start_date=datetime(1970, 1, 1),
    tags=["taskmap"]
) as expand_kwargs:

    @task
    def data():
        return [
            {"bash_command": "echo hello $USER", "env": {"USER": "foo"}},
            {"bash_command": "echo goodbye $USER", "env": {"USER": "bar"}},
        ]

    BashOperator.partial(task_id="two_tasks").expand_kwargs(data())

Operating System

Linux

Versions of Apache Airflow Providers

No response

Deployment

Other

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:UIRelated to UI/UX. For Frontend Developers.area:corekind:bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yet

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions