Bug 1866090

Summary: "selector" specDescriptor improperly deals with "GVK" for "Resource Type" filter the on the "Search" page
Product: OpenShift Container Platform Reporter: tony.wu
Component: Management ConsoleAssignee: Jon Jackson <jonjacks>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.6CC: aos-bugs, jokerman, yanpzhan, yapei
Target Milestone: ---   
Target Release: 4.6.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: 2020-10-27 16:23:15 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
1-1_CouchbaseCluster_details_page.png
none
1-2_Search_page__search_ConfigMap.png
none
2-1_Prometheus_instance_YAML.png
none
2-2_Prometheus_details_page.png
none
2-3_Search_page___search_ServiceMonitor.png
none
fixed-search none

Description tony.wu 2020-08-04 19:59:10 UTC
Created attachment 1710414 [details]
1-1_CouchbaseCluster_details_page.png

Description of problem:

On the "Operand's Details" page, click on those "query selector" links (powered by "selector specDescriptors") get redirects to the "Search" page.
However, on the "Search" page, the "Resource Type" filter doesn't correctly deal with the "GVK" being specified in the specDescriptor (see filter chips in the screenshots); hence, the specified Resource Type can't be applied to the query.


Version-Release number of selected component (if applicable):
OCP 4.4/4.5/4.6


How reproducible:
100%


Steps to Reproduce:

Option A). With "Couchbase" Operator:

1. Go to "OperatorHub" page and install "Couchbase" Operator to any namespace.

2. Go to "Installed Operators" page and create a "CouchbaseCluster" instance.

3. Go to "CouchbaseCluster" instance details page, click on any of those "query selector" links 
--> e.g. "Buckets selector" or "RBAC selector" or "Backup selector"
      see screenshot: 1-1_CouchbaseCluster_details_page.png

4. Get redirected to "Search" page, see "Resource Type" can't properly specify as "ConfigMap" resource type.
--> see screenshot: 1-2_Search_page__search_ConfigMap.png

Option B). With "Prometheus" Operator:

1. Go to "OperatorHub" page and install "Prometheus" Operator to any namespace.

2. Go to "Installed Operators" page and create a "Prometheus" instance.

3. Go to "Prometheus" instance details page, click on "YAML" tab and add 'matchLabels' as 'app: my-prometheus' to 'serviceMonitorSelector' property and click "Save". 
--> see attached screenshot: 2-1_Prometheus_instance_YAML.png

4. On "Prometheus" instance details page, click on "Service Monitor Selector" link
--> see attached screenshot: 2-2_Prometheus_details_page.png

5. Get redirected to "Search" page, see "Resource Type" can't properly specify as "ServiceMonitor" resource type.
--> see attached screenshot: 2-3_Search_page___search_ServiceMonitor.png


Actual results:

In the 4th step of Option A) repro steps, the "Resource Type" can't properly specify as "ConfigMap" on the "Search" page.

In the 5th step of Option B) repro steps, the "Resource Type" can't properly specify as "ServiceMonitor" on the "Search" page.


Expected results:

The "Resource Type" can properly specify as "ConfigMap" on the "Search" page as defined in specDescriptor.

In the 4th step of Option A) repro steps:
--> The "Resource Type" can properly specify as "ConfigMap" on the "Search" page as defined in specDescriptor.

In the 5th step of Option B) repro steps:
--> The "Resource Type" can't properly specify as "ServiceMonitor" on the "Search" page.


Additional info:
See screenshots in the attachments:

Comment 1 tony.wu 2020-08-04 19:59:35 UTC
Created attachment 1710415 [details]
1-2_Search_page__search_ConfigMap.png

Comment 2 tony.wu 2020-08-04 19:59:48 UTC
Created attachment 1710416 [details]
2-1_Prometheus_instance_YAML.png

Comment 3 tony.wu 2020-08-04 20:00:06 UTC
Created attachment 1710417 [details]
2-2_Prometheus_details_page.png

Comment 4 tony.wu 2020-08-04 20:00:20 UTC
Created attachment 1710418 [details]
2-3_Search_page___search_ServiceMonitor.png

Comment 5 Jon Jackson 2020-08-10 14:51:07 UTC
*** Bug 1867008 has been marked as a duplicate of this bug. ***

Comment 8 Yanping Zhang 2020-08-19 10:56:49 UTC
Tested on OCP 4.6 cluster with payload 4.6.0-0.nightly-2020-08-18-030245
Verified steps:
1. Go to "OperatorHub" page and install "Prometheus" Operator to any namespace.

2. Go to "Installed Operators" page and create a "Prometheus" instance.

3. Go to "Prometheus" instance details page, click on "YAML" tab and add 'matchLabels' as 'app: my-prometheus' to 'serviceMonitorSelector' property and click "Save". 

4. On "Prometheus" instance details page, click on "Service Monitor Selector" link

5. Get redirected to "Search" page, it filter with resource type "ServiceMonitor" and label "app=my-prometheus". See attachment "fixed-search".

Comment 9 Yanping Zhang 2020-08-19 10:57:36 UTC
Created attachment 1711857 [details]
fixed-search

Comment 11 errata-xmlrpc 2020-10-27 16:23:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.6 GA Images), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4196