Project

General

Profile

Bug #12140

scoped_search - err 500 on searching on invalid field

Added by roman plevka almost 4 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web UI
Target version:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1270855
Description of problem:
Applies to all katello entities:
on sending a query which uses a non-existing field, server returns error 500, but the GUI does not handle this error.
This results in 'dead' search form.

Request url:
https://<fqdn>/katello/api/v2/content_views?nondefault=true&organization_id=3&page=1&search=foo+%3D+bar&sort_by=name&sort_order=ASC

Response:
displayMessage:"Field 'foo' not recognized for searching!"
errors:Array:
0:"Field 'foo' not recognized for searching!"

Version-Release number of selected component (if applicable):
katello-2.4.0-6.nightly.el7.noarch
tfm-rubygem-scoped_search-3.2.2-2.el7.noarch

How reproducible:
every time on all katello entities

Steps to Reproduce:
1. go to a katello entity page (e.g. Content Views)
2. input the seaerch query with invalid field name - e.g. foo = bar
3. Hit search
4. No response on GUI (Error in the captured repsonse headers)

Actual results:
the error is not being handled by UI, renders the form unusable.

Expected results:
Notification is shown or some default behavior takes place.

Additional info:


Related issues

Related to Bastion - Bug #13952: Report scoped search errors to the userClosed2016-02-29

Associated revisions

Revision f1bf9daf (diff)
Added by John Mitsch over 3 years ago

Fixes #12140 - unreported scoped search errors on 500 field

Revision acc4864e
Added by John Mitsch over 3 years ago

Merge pull request #5819 from johnpmitsch/12140

Fixes #12140 - unreported scoped search errors on 500 field

History

#1 Updated by Eric Helms almost 4 years ago

  • Assignee set to John Mitsch
  • Legacy Backlogs Release (now unused) set to 70
  • Triaged changed from No to Yes

#2 Updated by Eric Helms over 3 years ago

  • Status changed from New to Resolved

Testing this myself on latest, I am seeing the use of an invalid search term resulting in everything continuing to work just not returning any results. Going to move this to resolved for the time being -- if you see this again in testing of the GA release of 2.4 please re-open and we'll investigate.

#3 Updated by roman plevka over 3 years ago

Eric Helms wrote:

Testing this myself on latest, I am seeing the use of an invalid search term resulting in everything continuing to work just not returning any results. Going to move this to resolved for the time being -- if you see this again in testing of the GA release of 2.4 please re-open and we'll investigate.

testing on:

# rpm -qa katello
katello-2.5.0-2.nightly.el7.noarch

The issue is still there.
just enter

foo = bar

into a search field and hit the search button.
Console spits out err 500, instead of results table, there is infinite spinner and no additional query works (not even clearing the search field and clicking the search button again).

#4 Updated by John Mitsch over 3 years ago

and ISE on an unsupported query seems to only happen on certain pages; I am seeing it on Errata, content views, subscriptions, and gpg keys.

#5 Updated by John Mitsch over 3 years ago

  • Status changed from Resolved to New

Re-opening since it is still able to be replicated

#6 Updated by John Mitsch over 3 years ago

  • Legacy Backlogs Release (now unused) changed from 70 to 86

#7 Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/5691 added

#8 Updated by roman plevka over 3 years ago

John Mitsch wrote:

and ISE on an unsupported query seems to only happen on certain pages; I am seeing it on Errata, content views, subscriptions, and gpg keys.

- It actually happens on all katello entity pages (activation keys, products, repositories, sync plans, puppet modules, etc.). These have been recently migrated from elastic search to scoped search. Only foreman entity pages handle this properly (they display error notification + the search_auto_complete displays the warning in the suggestion box).

Thanks for reopening

#9 Updated by John Mitsch over 3 years ago

so I ran into something that may be causing some confusion (at least it did for me) If you enter foo = bar in a search box, the autocomplete will sometimes come up with a blank query and when you hit enter it sends that blank query, which does not cause the ISE. When you click the actual search button, it sends "foo = bar" in the params, and you can see the error. Just want to share to save anyone else a headache :)

#10 Updated by John Mitsch over 3 years ago

  • Status changed from Ready For Testing to New
  • Pull request deleted (https://github.com/Katello/katello/pull/5691)

PR was closed

#11 Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/5819 added

#12 Updated by The Foreman Bot over 3 years ago

  • Pull request https://github.com/Katello/bastion/pull/97 added

#13 Updated by Eric Helms over 3 years ago

  • Related to Bug #13952: Report scoped search errors to the user added

#14 Updated by John Mitsch over 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF