Skip to content

External conditions are attached to the wrong task in graph view #50004

Open
@uranusjr

Description

@uranusjr

Apache Airflow version

3.0.0

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

No response

What happened?

When selecting “External conditions” in the graph view, outlets are attached incorrectly.

With a dag of three tasks, each outputs to an asset:

Image

This is confusing since outlets a1 and a2 are on tasks t1 and t2, but they are instead attached to t3.

What you think should happen instead?

The outlets should be attached to the correct task instead.

Alternatively, since dependencies only matter at the dag level, the outlets should be attached on the dag instead. This would match the “All Dag Dependencies” view:

Image

How to reproduce

from airflow.providers.standard.operators.empty import EmptyOperator
from airflow.sdk import DAG, Asset

a1 = Asset("a1")
a2 = Asset("a2")
a3 = Asset("a3")

with DAG("wrong-graph", is_paused_upon_creation=False):
    t1 = EmptyOperator(task_id="t1", outlets=[a1])
    t2 = EmptyOperator(task_id="t2", outlets=[a2])
    t3 = EmptyOperator(task_id="t3", outlets=[a3])
    t1 >> [t2, t3]

Operating System

Irrelevant

Versions of Apache Airflow Providers

Irrelevant

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:APIAirflow's REST/HTTP APIarea:UIRelated to UI/UX. For Frontend Developers.kind:bugThis is a clearly a bugpriority:mediumBug that should be fixed before next release but would not block a release

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions