airflow icon indicating copy to clipboard operation
airflow copied to clipboard

List Dag Run broken link to dag_run

Open raphaelauv opened this issue 1 year ago • 6 comments

Apache Airflow version

2.9.2

What happened?

if I click on a dag_run on the list dag run webserver page

it always show the latest dag_run and not the dag_run I clicked on

How to reproduce

from airflow.operators.empty import EmptyOperator
from pendulum import today
from airflow import DAG

with DAG(
        dag_id='example',
        schedule_interval='0 0 * * *',
        start_date=today("UTC").add(days=-5)):
    EmptyOperator(task_id="nothing")

https://github.com/apache/airflow/assets/10202690/c2c59783-67cf-44e2-ab14-b1ef52d31bb0

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

raphaelauv avatar Jun 13 '24 09:06 raphaelauv

@raphaelauv I tried this and not able to reproduce this. Are you facing this for all of your DAG's?

vatsrahul1001 avatar Jun 18 '24 05:06 vatsrahul1001

yes in google chrome and firefox

from the page http://localhost:8090/dagrun/list/?_flt_3_dag_id=example

you must click on the link of the run_id column ( like in the screen record )

raphaelauv avatar Jun 18 '24 08:06 raphaelauv

@raphaelauv I am able to repo thus

vatsrahul1001 avatar Jun 18 '24 11:06 vatsrahul1001

Hi, I would like to work on this issue, I have done some initial debugging. @potiuk can you please assign it to me.

ayush3singh avatar Jun 21 '24 09:06 ayush3singh

Sure

potiuk avatar Jun 21 '24 09:06 potiuk

When click on a dag_run in dag_run list page, the link is like below one. This link does not exist, so rediect to the latest one. https://localhost/pipelines/dags/transition_execute/graph?dag_run_id=dag_run_id When click on a grid in dag_detail page, the link is like below one. This link is correct. https://localhost/pipelines/dags/transition_execute/grid?dag_run_id=dag_run_id

So I think the brief change is to change https://localhost/pipelines/dags/transition_execute/graph?dag_run_id=dag_run_id to https://localhost/pipelines/dags/transition_execute/grid?dag_run_id=dag_run_id (just replace graph with grid) when click on a dag_run in dag_run list page.

laoni3634 avatar Jun 28 '24 07:06 laoni3634

Couldn't reproduce it on the main branch. It's already has fixed in 2.9.3 by @bbovenzi here https://github.com/apache/airflow/pull/40241

romsharon98 avatar Aug 02 '24 08:08 romsharon98

@romsharon98 the issue was open against version 2.9.2

and it was fix by https://github.com/apache/airflow/pull/40241 in version 2.9.3 ( that is part of the main branch )

raphaelauv avatar Aug 02 '24 08:08 raphaelauv