Skip to content
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

Incorrect DAG Run ID opened when clicking on run_id link from DAG run list #41406

Closed
1 of 2 tasks
hkc-8010 opened this issue Aug 12, 2024 · 9 comments · Fixed by #42138
Closed
1 of 2 tasks

Incorrect DAG Run ID opened when clicking on run_id link from DAG run list #41406

hkc-8010 opened this issue Aug 12, 2024 · 9 comments · Fixed by #42138
Labels
affected_version:2.10 Issues Reported for 2.10 area:UI Related to UI/UX. For Frontend Developers. good first issue kind:bug This is a clearly a bug

Comments

@hkc-8010
Copy link

Apache Airflow version

2.9.3

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

No response

What happened?

When I try to open an older DAG run by clicking on the run_id link from the DAG run list, it incorrectly opens the DAG run with a different run_id. This issue makes it difficult to view the details of specific older DAG runs.

What you think should happen instead?

Clicking on a run_id link from the dag run list should open the DAG run corresponding to that run_id.

How to reproduce

  • Navigate to the DAG runs list.
  • Select a specific DAG to view its run history.
  • Click on the run_id link of an older DAG run in the list.
  • Notice that the page loads a DAG run with an incorrect run_id.

Operating System

Linux ad25902d8cef 6.7.12-orbstack-00201-g2ddb8f197a46 #1 SMP Tue May 21 04:38:26 UTC 2024 aarch64 GNU/Linux

Versions of Apache Airflow Providers

No response

Deployment

Astronomer

Deployment details

Start an Airflow instance using the AstroCLI command astro dev start, run an example dag multiple times, and try accessing dag_run older than 25 from the dag runs list page of the Airflow UI.

Anything else?

Click on the older run_id link from the dag run list

Screenshot 2024-08-12 at 8 14 16 PM

It will open the graph view. Click on any task in the graph view, and it will show the details for the incorrect dag run_id.

Screenshot 2024-08-12 at 8 14 27 PM

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@hkc-8010 hkc-8010 added area:core kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels Aug 12, 2024
@dosubot dosubot bot added the area:UI Related to UI/UX. For Frontend Developers. label Aug 12, 2024
@tirkarthi
Copy link
Contributor

Looks like a duplicate of #40214

@RNHTTR RNHTTR removed area:core needs-triage label for new issues that we didn't triage yet labels Aug 12, 2024
@RNHTTR
Copy link
Contributor

RNHTTR commented Aug 12, 2024

Looks like a duplicate of #40214

That Issue appears to be solved in 2.9.3. @hkc-8010 can you please confirm that this is occurring on 2.9.3?

@hkc-8010
Copy link
Author

It appears that the issue has been resolved for the dag_id link, which points to the Grid view. However, the run_id link, pointing to the Graph view, is still incorrect. I was able to replicate this issue on version 2.9.3.

@tirkarthi
Copy link
Contributor

@hkc-8010 Does run_id in the details tab match the expected value and the query string in the url? Some changes were done in #35946

@hkc-8010
Copy link
Author

@tirkarthi - Here is hyperlink attached to the run_id in the Dag run list - manual__2024-08-09T08:42:25.524227+00:00

The hyperlink appears correct, but when it opens the Graph view and I click on a task, it displays an incorrect run_id—specifically, the run_id from the previous run instead of the desired one.

It seems the hyperlink is updating the calendar tab to the exact run_id value, which causes the Graph or Grid view to display only historical DAG runs, excluding the desired DAG run.

image

@hkc-8010
Copy link
Author

I believe this PR might resolve the issue. I'll test it on version 2.10.0 and will update you here. Thanks!

@hkc-8010
Copy link
Author

I just verified on 2.10. Still facing the same issue.

@karenbraganz
Copy link
Contributor

Hem and I tested this out in Airflow 2.10 (Astro runtime 12.0.0) and noticed that this bug still exists but only for certain types of runs (when the run_id timestamp is not at the 0th second of the minute).

  • When testing this out with runs scheduled to run every minute, I did not see this bug. I was able to go to Browse -> DAG Runs, find a DAG run older than the 25th record, click on the run ID, and open the correct DAG run page.

  • However, when testing this out with manual runs, the bug became apparent. For example, I triggered a manual run with run_id=manual__2024-08-28T13:54:14.979062+00:00.

    • After over 25 runs, I tried opening this DAG run by clicking on the run_id in Browse-> DAG Runs. This opened the DAG without a specific run highlighted (see below).

    image

    • When I clicked on a task in the graph view, it highlighted the run that had occurred just before the run I had clicked on in the grid. The run_id for this was scheduled__2024-08-28T13:54:00+00:00 as indicated in the screenshot below. The run I wanted to open was not part of the grid. Hem observed this as well in his tests.

    image

    • In contrast, when I opened the DAG run for run_id=scheduled__2024-08-28T13:54:00+00:00, it opened and highlighted the correct DAG run. This might suggest that the bug only appears for manual runs, but this is not true as described in the next bullet point.
  • When I modified the DAG to have schedule=@continuous, the bug appeared once again for scheduled runs indicating that it is not exclusive to manual runs. For example, when I clicked on a run_id which was scheduled__2024-08-28T16:47:22.632138+00:00, I saw the same bug as before where it opened a page without any DAG run highlighted. When i clicked on one of the tasks in the graph, it highlighted the run previous to what I clicked on in the grid. The run_id for this was scheduled__2024-08-28T16:47:20.415112+00:00, and the run I was looking for was not visible in the grid. Hem observed this as well in his tests.

  • Based on these observations, I believe the bug appears only for DAGs with run ID timestamps that are not at the 0th second of the minute. Due to the bug, you are only able to see the run previous to the run you wanted to locate. It does not depend on whether the run was scheduled or manually triggered. For example, the bug appeared for run_id=scheduled__2024-08-28T16:47:22.632138+00:00 but not for run_id=scheduled__2024-08-28T13:54:00+00:00.

@pierrejeambrun
Copy link
Member

Fix here:
#42138

Let me know if this is the expected behavior. Marked for backporting so hopefully we can get that in the next patch release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affected_version:2.10 Issues Reported for 2.10 area:UI Related to UI/UX. For Frontend Developers. good first issue kind:bug This is a clearly a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants