Bug 1986699

Summary: we should take catalogsource into considering when showing Installed tile in OperatorHub catalog
Product: OpenShift Container Platform Reporter: Yadan Pei <yapei>
Component: Management ConsoleAssignee: ralpert
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.9CC: aos-bugs, jokerman, spadgett, yapei
Target Milestone: ---   
Target Release: 4.9.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: 2021-10-18 17:42:48 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
showing 'Installed' tile for both operators provided by different catalogsource
none
version is not matching none

Description Yadan Pei 2021-07-28 06:49:57 UTC
Created attachment 1806536 [details]
showing 'Installed' tile for both operators provided by different catalogsource

Description of problem:
console is showing wrong 'Installed' status for the operator who has the same display name but provided by different catalogsource

Version-Release number of selected component (if applicable):
4.9.0-0.nightly-2021-07-27-125952

How reproducible:
Always

Steps to Reproduce:
1. create a catalogsource in which we have 'Prometheus Operator' and its latest version is 0.22.2
$ cat > catalogsource-example.yaml << EOF
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: yapei-testoperators
  namespace: openshift-marketplace
spec:
  sourceType: grpc
  image: quay.io/openshifttest/ui-auto-operators@sha256:feb39d5dca35fcbf73713672016b8c802146252a96e3864a0a34209b154b6482
  displayName: QE test operators
EOF
2. catalogsource community-operators also has 'Prometheus Operator' and latest version is 0.47.0
# oc get packagemanifests | grep -i prometheus
prometheus-exporter-operator                         Community Operators    6h8m
prometheus                                           Community Operators    6h8m
prometheus                                           yapei test operators   9m44s
3. goes to OperatorHub page -> filter by 'Prometheus Operator' -> choose the one provided by Community Operators -> finish installation process and add it to 'default' project
4. check if operator is successfully installed
# oc get csv -n default
NAME                        DISPLAY               VERSION   REPLACES                    PHASE
prometheusoperator.0.47.0   Prometheus Operator   0.47.0    prometheusoperator.0.37.0   Succeeded
5. go back to OperatorHub page, filter by keyword 'Prometheus Operator', check which catalog item has 'Installed' footer

Actual results:
5. Both the Prometheus Operator coming from Community and custom catalogsource are showing a 'Installed' tile

Expected results:
5. we should not show 'Installed' tile for the Prometheus Operator from custom catalogsource, it is confusing that we show 'Installed' tile while it is not installed by user

Additional info:

Comment 1 Yadan Pei 2021-07-28 06:53:58 UTC
Created attachment 1806538 [details]
version is not matching

Comment 2 Yadan Pei 2021-07-28 08:11:53 UTC
This will block operator installation when user tries to subscribe the other operator(with same name) provided by another catalogsource

Comment 5 Yadan Pei 2021-08-31 05:47:31 UTC
Install etcd operator provided by customized catalogsource, check 'Installed' tile in OperatorHub list page, only the operator coming from customized catalogsource is showing a 'Installed' tile, the etcd operator comes from Community doesn't have a 'Installed' tile

Verified on 4.9.0-0.nightly-2021-08-30-192239

Comment 8 errata-xmlrpc 2021-10-18 17:42:48 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 (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), 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/RHSA-2021:3759