amundsen icon indicating copy to clipboard operation
amundsen copied to clipboard

Failed search for one resource (e.g., user or dashboard) causes no results to show for any resource

Open jonhehir opened this issue 5 years ago • 5 comments

Right now, if any one of the search requests returns a non-200 status, it causes any search from the search bar to return no results. This can happen, for example, by simply enabling indexUsers or indexDashboards before importing any data for those resources. In this case, searching for any table will return no results (unless you explicitly search for only tables via the sidebar of the search page).

Expected Behavior

If the search results succeed on the backend for a given resource (e.g., table), it should show on the frontend.

Current Behavior

This currently only happens if the search request succeeds for all search types (e.g., table, user, dashboard).

Possible Solutions

  • Modify the frontend to display search results from any successful search rather than requiring all searches to succeed. (In the case of any single failure, the frontend merely shows "no results" for all resource types.)
  • Modify the search service to more gracefully handle the case when a search index does not yet exist.

Steps to Reproduce

  1. Follow the instructions for bootstrapping an Amundsen install in Docker, including the loading of sample data via sample_data_loader.py.
  2. Search for test. Test tables should appear in the search results.
  3. Enable indexUsers and indexDashboards in config-custom.ts.
  4. Search for test again. No results will appear.

Screenshots (if appropriate)

image

image

Your Environment

Recent checkout of Amundsen repo running through packaged docker-amundsen.yml.

jonhehir avatar May 29 '20 21:05 jonhehir

@ttannis do you know what happens ?

feng-tao avatar May 29 '20 21:05 feng-tao

I believe the front-end behavior stems from the all() effect used to combine the three searches here: https://github.com/lyft/amundsenfrontendlibrary/blob/6b324c8b3ed26263ae44a17cb13789af729b2a8a/amundsen_application/static/js/ducks/search/sagas.ts#L216. I didn't see an easy way to modify this behavior, so I opened this issue instead. 😄

jonhehir avatar May 29 '20 22:05 jonhehir

@ttannis do you know what happens ?

@jonhehir is correct. I'm aware of the issue but haven't gotten around to it yet.

ttannis avatar May 30 '20 00:05 ttannis

Ah i see, so if we enable user/dashboard entity, we assume there are data return...

feng-tao avatar May 30 '20 04:05 feng-tao

cc @allisonsuarez

feng-tao avatar Dec 18 '20 23:12 feng-tao