Skip to content

Only one dagrun is shown per asset event in UI #48482

@tirkarthi

Description

@tirkarthi

Apache Airflow version

main (development)

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

No response

What happened?

When there are multiple dagruns per asset event only one is shown. I guess I made it this way because there was no dagrun list page and asset page during the component being added. Initially the design had first 2 or 3 dagruns and then more ones as "+n more" . Should all dagruns be shown as links or in case of "n more" should it be a popup showing them.

created_dagruns[0] is used which should be looping through created_dagruns

<Text>Triggered Dag Runs: </Text>
{hasDagRuns ? (
<Link to={`/dags/${event.created_dagruns[0]?.dag_id}/runs/${event.created_dagruns[0]?.run_id}`}>
<Text color="fg.info"> {event.created_dagruns[0]?.dag_id} </Text>
</Link>
) : (
"~"
)}
</HStack>

What you think should happen instead?

No response

How to reproduce

  1. Create an asset event with both dags enabled.
  2. Only one dagrun is shown in the asset event widget though 2 dagruns got triggered.
from __future__ import annotations

import datetime

from airflow.decorators import task
from airflow.models.dag import DAG
from airflow.sdk.definitions.asset import Asset

asset = Asset(uri="s3://output.txt", name="test-asset-output")

with DAG(
    dag_id="asset_dag_1",
    catchup=False,
    start_date=datetime.datetime.min,
    schedule=[asset],
):

    @task()
    def run_1():
        pass

    run_1()

with DAG(
    dag_id="asset_dag_2",
    catchup=False,
    start_date=datetime.datetime.min,
    schedule=[asset],
):

    @task()
    def run_2():
        pass

    run_2()

Operating System

Ubuntu 20.04

Versions of Apache Airflow Providers

No response

Deployment

Virtualenv installation

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

Labels

AIP-38Modern Web Applicationarea:UIRelated to UI/UX. For Frontend Developers.area:corekind:bugThis is a clearly a bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions