Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1603091

Summary: [converged] Fuzzy filter can have unexpected matches on events page
Product: OpenShift Container Platform Reporter: Yadan Pei <yapei>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED CURRENTRELEASE QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: medium    
Version: 3.11.0CC: aos-bugs, jokerman, lxia, mmccomas, spadgett, yapei
Target Milestone: ---   
Target Release: 3.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-17 14:55:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Loading
none
IncorrectMessage none

Description Yadan Pei 2018-07-19 06:54:23 UTC
Description of problem:
Filter events by message doesn't show correct events.

Version-Release number of selected component (if applicable):
docker.io/openshift/origin-console                                         c7d7d480b26d
v3.10.18

How reproducible:
Always

Steps to Reproduce:
1.Create app
$ oc new-app ruby~https://github.com/openshift/ruby-ex.git
2.Go to Troubleshooting -> Events page, projects events are listed here
3.Filter events by message, like keyword "delete"
4.Filter events by message, like keyword "killing"

Actual results:
3. Events are not filtered correctly,there are still some events like:
Build yapei-normal1/ruby-ex-2 completed successfully
Container image "registry.reg-aws.openshift.com:443/openshift3/ose-docker-builder:v3.10.18" already present on machine
4. Events page keeps loading, nothing returned

Expected results:
3. Should only show events message contains 'delete',screenshot will be attached
4. Should show messages contains "killing",screenshot will be attached

Additional info:

Comment 1 Yadan Pei 2018-07-19 06:54:59 UTC
Created attachment 1459892 [details]
Loading

Comment 2 Yadan Pei 2018-07-19 06:55:25 UTC
Created attachment 1459893 [details]
IncorrectMessage

Comment 3 Samuel Padgett 2018-07-19 12:06:04 UTC
It's a fuzzy filter, so as long as the characters appear somewhere in the string in that order, the event will show up. They don't have to show up directly next to each other. We could look at changing this, but this is actually working as designed.

Marking this as low because it's working as intended.

Comment 4 Samuel Padgett 2018-07-19 12:36:57 UTC
For reference, this is fuzzy filter we're using: https://github.com/bevacqua/fuzzysearch

Comment 5 Samuel Padgett 2018-07-19 12:38:30 UTC
> 4. Events page keeps loading, nothing returned

I'm unclear how to reproduce this, but this sounds an unrelated problem. Please open a separate bug.

Comment 6 Yadan Pei 2018-07-20 00:45:35 UTC
> Marking this as low because it's working as intended.

Ok, make sense

Comment 7 Yadan Pei 2018-07-20 00:46:21 UTC
> I'm unclear how to reproduce this, but this sounds an unrelated problem. Please open a separate bug.

Ok, will try and see if we could open a separate bug

Comment 8 Yadan Pei 2018-07-20 01:15:10 UTC
I see what cause the page keeps loading, since fuzzy filter had unexpected matches, given some keywords will return nothing, but the events are still loading, so we could see a loading icon(keeps loading) on the page as in screenshot "Loading"

It should be the same underlying cause, will not open another bug.

Comment 9 Samuel Padgett 2018-08-18 15:49:48 UTC
https://github.com/openshift/console/pull/423

Comment 10 Yadan Pei 2018-08-22 08:27:11 UTC
Checked on 
registry.reg-aws.openshift.com:443/openshift3/ose-console                   v3.11               8b58053eb16b       273 MB

1. Create Some builds
2. Go to Home -> Events page

Scenario 1: Search "killing" but we got "No Matching Events" returned on page although we could see "Killing container id...." message

Scenario 2: Search "delete" but we didn't got a event with "delete" word in it, especially we have message "Deleted pod ..."

All I got is not expected I think.

I found PR 423 was merged in Aug 20 07:34:15 2018 and 3.11.0-0.19.0 was built on Aug 21, I assume PR was indeed included(I don't get response about if there's way to check if fix PR goes into particular image)

commit 5c23a9e9d6034d4811c0ef4442657ef0aff2dc3b
Merge: 64a2ec70d e0bdb5d90
Author: OpenShift Merge Robot <openshift-merge-robot.github.com>
Date:   Mon Aug 20 07:34:15 2018 -0700

    Merge pull request #423 from spadgett/events-search

    Bug 1603091 - Don't use fuzzy filter on event messages

Could u help confirm? A recording will be attached

Comment 12 Yadan Pei 2018-08-22 08:28:26 UTC
As comment 10

Comment 13 Samuel Padgett 2018-08-22 11:15:01 UTC
It looks like you don't have the fix. The placeholder text is the filter input is not updated, so you are testing the old code.

I'll follow up on how to determine if a fix is in a build. Sorry I don't have a good answer for that yet :(

Comment 14 Yadan Pei 2018-08-23 01:35:11 UTC
Thank you Sam,

I will wait for next image

Comment 15 Yadan Pei 2018-08-24 02:51:19 UTC
Fixed merged in 
registry.dev.redhat.io/openshift3/ose-console                   v3.11.0             3bad56e275c40       283MB


Sometimes single keywords and keywords combination(keyword1 keyword2) works well, but it looks like some special characters are not identified, search "ruby-ex-1", "ruby-ex-2" related messages are also returned, see recording

Comment 16 Samuel Padgett 2018-08-24 13:14:19 UTC
Can you link to the recording?

Comment 17 Samuel Padgett 2018-08-24 13:16:22 UTC
OK I see the problem. `_.words` splits "ruby-ex-1" into ["ruby", "ex", "1"] and matches those strings. We should treat that as one word.

Comment 18 Samuel Padgett 2018-08-24 16:36:24 UTC
PR to add more strict matching for special characters:

https://github.com/openshift/console/pull/454

Comment 19 Samuel Padgett 2019-01-16 21:32:03 UTC
This was fixed in 3.11, but bug state was not transitioned.

Comment 20 Yadan Pei 2019-01-17 08:09:28 UTC
Checked on v3.11.69
registry.reg-aws.openshift.com:443/openshift3/ose-console                   v3.11               33c801332260        10 hours ago        254 MB



1. word with special character, such as "ruby-ex-1" returns correct matching result
2. combination words, such as "created container" returns correct matching events
3. signle word, such as "delete" returns correct matching result

Move to VERIFIED