-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Links to specific dagruns don't work when older than 25 runs #34723
Comments
This date is the max date for the X dag runs, when you choose 2023-01-01 as start date, and 25 as a number of runs, the UI will show you the previous 25 runs before 2023-01-01. To select a dag run, you need to click on the red/green bar in the grid view. |
This was not the case in Airflow 2.5, i could click on links referring to any dagrun, no matter how old, and it would correctly select it in the grid-view. To clarify, i am browsing the dagrun list attached below and clicking an item in the picture 1 here, then it results in the picture 2 (same as above) where no run is selected: |
I did a test with an example DAG, triggered this manually >25 times. As the GRID view shows 25 items per default all is fine if you click on one of the recent 25 items. If you click on an item >25 runs, GRID view will not adjust the selection of the 25runs to include in the column section your run. In my setup it shows the grid view, but clicking on the "Details" tab it shows the DAG overview, not details of the (previously) selected DAG runs. So in total it is hard to navigate from a DAG search result to the GRID view t check for details. (Especially because in GRID view the search options are limited compared to the DAG search screen) |
I've done some debugging: Problem 1. Problem 2 I think both solution A and C are must haves here. B is optional, more nice to have to get rid of legacy in the future. |
Hello, This was Ok in airflow 2.6.2. This possibility to get logs on the history (more than 25 run ago) is very important for us. It's way too hard to hack the url each time for us. We would probably rollback waiting for this issue. Alexandre Gué, |
Sorry for pinging but is there any way we can move this forward? I've already provided a fix in #34887, waiting for review. |
Also eagerly waiting for this fix. For the time being, is there a workaround to filter + navigate to a dagrun? |
I found a workaround to this problem in v2.7.3. If you add
|
Thanks @jermaine151, that seems to work indeed. It doesn't visually highlight a dagrun in the grid view (see Screenshot), but if you navigate to the Graph tab, then click on a Task it does lead you to the dagrun from the URL. That last bit is important because in our case multiple runs are triggered on the same second, the gridview doesn't distinguish between those. |
Are you adding the |
cc: @bbovenzi @pierrejeambrun - would be cool to take a look and fix that one as it seems to be an important feature for those who complain about loosing the old grid view (see #36884) and it seems a bit of an architectural decision on the grid view behaviour. |
Previously, if user set dag_run_id parameter in the url, that refers to a old run, which doesn't fit in the most recent 25 runs, then the requested run will not be selected. This change fixes this by setting the base_date to a time where the run_id is known to exist if dag_run_id is provided as an explicit query parameter. closes: apache#34723
…4887) Previously, if user set dag_run_id parameter in the url, that refers to a old run, which doesn't fit in the most recent 25 runs, then the requested run will not be selected. This change fixes this by setting the base_date to a time where the run_id is known to exist if dag_run_id is provided as an explicit query parameter. closes: #34723
…4887) Previously, if user set dag_run_id parameter in the url, that refers to a old run, which doesn't fit in the most recent 25 runs, then the requested run will not be selected. This change fixes this by setting the base_date to a time where the run_id is known to exist if dag_run_id is provided as an explicit query parameter. closes: #34723 (cherry picked from commit a0ebabb)
Apache Airflow version
2.7.1
What happened
AIRFLOW/dagrun/list/?_flt_3_dag_id=my_dag
It should take you to
AIRFLOW/dags/mydag/graph?run_id=scheduled__2023-09-21T00%3A00%3A00%2B00%3A00&execution_date=2023-09-21+00%3A00%3A00%2B00%3A00
and it does so correctlyWhen clicking on any item in the graph, the LATEST run is selected in the grid. If the user is not careful to observe this, they are mislead to thinking the results they are browsing in the graph is the ones they selected in step 2.
As workaround, one can append
&num_runs=365
to the url, this will take you to the correct run from step 2. But eventually you will exhaust 365 runs as well.This problem isn't only applicable to the dagrun list. Any links to the /dags/ graph are affected. We have external systems linking to individual dagruns that now get unusable after 25 runs.
What you think should happen instead
When navigating to a run via link, it should always present the run that was provided in run_id querystring.
How to reproduce
See above
Operating System
Debian GNU/Linux 11 (bullseye)
Versions of Apache Airflow Providers
No response
Deployment
Other Docker-based deployment
Deployment details
No response
Anything else
This was not a problem in Airflow 2.5, regression in 2.7, probably introduced by new embedded graph view (which otherwise is great :))
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: