Skip to content

In the DAG Graph view, all DAG runs disappear after selecting a Run State #37966

Description

@rgelsi

Apache Airflow version

2.8.2

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

No response

What happened?

In the DAG Graph view, all DAG runs disappear after selecting a Run State from the dropdown. After reloading the page, the DAG runs with the selected states reappear.

airflow_dag_run_state_bug

In version 2.8.1 it was working as intended and it still works as expected in the Grid view.

What you think should happen instead?

In the DAG Graph view, selecting a DAG run state should display all DAG runs with that state.

How to reproduce

  1. Create and start a Dummy DAG with Dummy operators.
  2. Open the DAG Graph View
  3. Select a DAG run state from the dropdown

Operating System

Oracle Linux 8.9

Versions of Apache Airflow Providers

No response

Deployment

Official Apache Airflow Helm Chart

Deployment details

Kubernetes v1.26.9

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. boring-cyborg commented on Mar 7, 2024

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

  2. added
    area:UIRelated to UI/UX. For Frontend Developers.
    and removed
    needs-triagelabel for new issues that we didn't triage yet
    on Mar 7, 2024
  3. bbovenzi commented on Mar 7, 2024

    @bbovenzi
    Contributor

    Does this only happen for running DAG runs and only in the graph now? Gantt, Details, etc are fine?

  4. rgelsi commented on Mar 7, 2024

    @rgelsi
    Author

    This happens with all types of DAG run states and, in addition to the Graph view, also in the Gantt view. Grid/Details and Code view do not have this issue.

  5. potiuk commented on Mar 7, 2024

    @potiuk
    Member

    Can you please open Console in your browser and copy paste the logs and error details printed there - it looks like a javascript error that might come from some of your specific DAG configuration / state/ historical data - and without having the stack trace it will be rather impossible to figure out the problem (and having stack traces/javascript output should be helpful - if there are some printed in the console)

  6. rgelsi commented on Mar 8, 2024

    @rgelsi
    Author

    The following error is displayed in the Browser Console:

    response: "{\"error\": \"Can not provide filters when dag_run_id filter is selected.\"}"
    responseText: "{\"error\": \"Can not provide filters when dag_run_id filter is selected.\"}"
    responseURL: "https://airflow.mydomain.com/object/grid_data?dag_id=test_dag_v1&num_runs=5&run_state=running&dag_run_id=manual__2024-03-08T13:03:38.006850%2B00:00"
    status: 400
    statusText: "BAD REQUEST"
    

    This error message was added with version 2.8.2: https://github.com/apache/airflow/blob/2.8.2/airflow/www/views.py#L3585

    When accessing a DAG via the graph or grid view, the parameter dag_run_id is added to the URL. This is not the case with the grid or code view. After manually removing the dag_run_id from the URL, the filter works as expected.

  7. bbovenzi commented on Mar 8, 2024

    @bbovenzi
    Contributor

    That makes sense. If you have a dag run selected, we shouldn't let you filter out your selection.
    So either setting a filter clears your selection or filters are disabled when a dag run is selected with a warning

  8. eladkal commented on Mar 15, 2024

    @eladkal
    Contributor

    @bbovenzi do we have a task here?

  9. bbovenzi commented on Mar 20, 2024

    @bbovenzi
    Contributor

    @bbovenzi do we have a task here?

    Yes, let's clear a user's selection if the Dag run is no longer on the page after filters change.

  10. bbovenzi commented on Apr 18, 2024

    @bbovenzi
    Contributor

    Actually I think this is fixed by #38941 But we should also add some better empty states here to prompt users to clear any filters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    _eol_affected_version:2.8Issues Reported for 2.8area:UIRelated to UI/UX. For Frontend Developers.kind:bugThis is a clearly a bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions