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

Search Function Not Working in Airflow UI #33895

Closed
1 of 2 tasks
buu-nguyen opened this issue Aug 29, 2023 · 5 comments · Fixed by #33931
Closed
1 of 2 tasks

Search Function Not Working in Airflow UI #33895

buu-nguyen opened this issue Aug 29, 2023 · 5 comments · Fixed by #33931
Assignees
Labels
affected_version:main_branch Issues Reported for main branch area:UI Related to UI/UX. For Frontend Developers. good first issue kind:bug This is a clearly a bug
Milestone

Comments

@buu-nguyen
Copy link

Apache Airflow version

2.7.0

What happened

Actual Behavior:
Upon entering a keyword in the search bar, no search results are shown, and the UI remains unchanged. The search function seems to be non-responsive.
You can see in the address bar, undefined appears instead of valid value.
step-1
step-2

What you think should happen instead

Expected Behavior:
When I use the search function in the Airflow UI, I expect to see a list of results that match the entered keyword. This should help me quickly locate specific DAGs or tasks within the UI.

How to reproduce

Steps to Reproduce:

  1. Log in to the Airflow UI.
  2. Navigate to the "Connections" list view by clicking on the "Connections" link in the navigation menu or by directly visiting the URL: <your_airflow_ui_url>/connection/list/.
  3. Attempt to use the search function by entering a keyword.
  4. Observe that no search results are displayed, and the search appears to do nothing.

Operating System

MacOS

Versions of Apache Airflow Providers

No response

Deployment

Other

Deployment details

Standalone Airflow via official Quickstart documentation

Anything else

I encounter this issue since Airflow 2.6.0. It was fine on Airflow 2.5.3.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@buu-nguyen buu-nguyen 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 29, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Aug 29, 2023

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.

@SamWheating
Copy link
Contributor

I have replicated this issue in Breeze on main, it looks like the contains and equal to filters are broken on both connections and dagruns page (likely others too, but I didn't check everywhere).

Feel free to assign to me and I'll keep investigating.

@eladkal eladkal added area:UI Related to UI/UX. For Frontend Developers. affected_version:main_branch Issues Reported for main branch good first issue and removed needs-triage label for new issues that we didn't triage yet area:core labels Aug 29, 2023
@Usiel
Copy link
Contributor

Usiel commented Aug 30, 2023

In the meantime, here's a workaround for people who depend on this: Replace the undefined part with the corresponding filter op index. For example, to do "run_id contains needle" you replace the invalid query param "_flt_undefined_dag_id=needle" with "_flt_2_dag_id=needle". Why 2 in this case? Because "contains" is the 2nd operation in the list (0 based index).

@potiuk potiuk added this to the Airflow 2.7.1 milestone Aug 30, 2023
@SamWheating
Copy link
Contributor

I have done some looking and I think that this is due to this change:
https://github.com/dpgaspar/Flask-AppBuilder/pull/2039/files

Which was created in response to another airflow issue:
#31156

So anytime we change the filter (i.e, selecting the non-default filter type) the changeOperation function returns undefined rather than a correct filter index, which is why we end up with _flt_undefined_ in the form data.

Verified this by setting a breakpoint and then getting the index the old way and the new way:

e.value
> '2'
$(e.target).val()
> undefined

We could just open a revert in FAB, but I want to ensure that we don't re-introduce the original issue.

@SamWheating
Copy link
Contributor

Ah, looks like this was fixed in dpgaspar/Flask-AppBuilder#2079, which was released in 4.3.4

I have confirmed that this fixes things by upgrading FAB in breeze and then restarting the webserver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affected_version:main_branch Issues Reported for main branch 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.

5 participants