Bug 1881844 - Community and Marketplace operators doesn't show a badge in Operator Hub page and Operator Hub Details Modal
Summary: Community and Marketplace operators doesn't show a badge in Operator Hub page...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.6.0
Assignee: Jon Jackson
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-23 08:09 UTC by Yadan Pei
Modified: 2020-10-27 16:44 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:44:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screenshot of badges (162.75 KB, image/png)
2020-10-07 06:50 UTC, Siva Reddy
no flags Details
Screenshot of Community (180.44 KB, image/png)
2020-10-07 06:51 UTC, Siva Reddy
no flags Details
Screenshot of marketplace (174.00 KB, image/png)
2020-10-07 06:51 UTC, Siva Reddy
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 6800 0 None closed Bug 1881844: Fix OperatorHub item badges and alerts 2020-12-04 21:36:39 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:44:25 UTC

Description Yadan Pei 2020-09-23 08:09:04 UTC
Description of problem:
In 4.6, by default no catalogsource is created with opsrc-provider label which we parsed to get srcProvider 
const srcProvider = _.get(packageManifest, 'metadata.labels.opsrc-provider')

therefore custom provider type is used. 
const getCustomOperatorProviderType = (packageManifest) => 
packageManifest.status.catalogSource;packageManifest.status.catalogSourceDisplayName || packageManifest.status.catalogSource

But we didn't have a map for these values, such as 'Red Hat Marketplace' ,'Community Operators', so no community or marketplace badge is shown on Operator page && Operator details modal

$ oc get catalogsource -n openshift-marketplace --show-labels
NAME                  DISPLAY                TYPE   PUBLISHER      AGE   LABELS
certified-operators   Certified Operators    grpc   Red Hat        8h    <none>
community-operators   Community Operators    grpc   Red Hat        8h    <none>
qe-app-registry       Production Operators   grpc   OpenShift QE   8h    <none>
redhat-marketplace    Red Hat Marketplace    grpc   Red Hat        8h    <none>
redhat-operators      Red Hat Operators      grpc   Red Hat        8h    <none>

Version-Release number of selected component (if applicable):
4.6.0-0.nightly-2020-09-22-200146

How reproducible:
Always

Steps to Reproduce:
1.cluster admin goes to OperatorHub page, and choose Provider Type 'Community Operators' or 'Red Hat Marketplace'
2. 
3.

Actual results:
2. We didn't show 'Community' or 'Marketplace' badge on the page

Expected results:
2. We should show 'Community' or 'Marketplace' badge on OperatorHub page and Operator Details modal

Additional info:

Comment 1 Jon Jackson 2020-09-29 20:40:12 UTC
I've spent some time looking into this and discussing with OLM team. It looks like this was caused when the default OLM marketplace sources were updated from OperatorSources to CatalogSources. The 'opsrc-provider' label is no longer present on the source or package manifest. This is the labe we used to render the "Marketplace" and "Community" badges, as well as the warning alerts in the details pane. In order to resolve this UI bug, we're going to have to figure out how to fix the gap left by that missing label.

Comment 2 Yadan Pei 2020-09-30 01:10:22 UTC
Yeah Jon, you are right. I also tried to fix it locally and after several trying I came up with following plan:

1. Still show the `displayName` of catalogsource in OperatorHub Provider Type
2. When `displayName` contains `Community` or `Marketplace`, the badge and warning in details page will be shown


HDYT?

Comment 3 Jon Jackson 2020-09-30 18:14:45 UTC
After further discussion with OLM team, looks like the best solution would be to drive these badges and alerts based on the defualt CatalogSource name instead of a label. I was worried about this approach at first because it could cause a regression if customers were using the 'opsrc-provider' label to render badges, but OLM team confirmed that this was only a 'side effect' of the original implementation, not an intentional feature. These badges and alerts should be unique to our Red Hat provided operators, so using the default catalog source names is an acceptable solution.

Comment 4 Jon Jackson 2020-09-30 18:25:46 UTC
Also, with approval from Sam, changed this to medium severity and targeted 4.6 because it's a pretty significant bug and low risk fix.

Comment 7 Siva Reddy 2020-10-07 06:45:33 UTC
Now the community and marketplace show up on the tiles and modal. Hence marking the bug as verified.

Version:
4.6.0-0.nightly-2020-10-05-234751

Steps to verify:
1. Login to web console as kubeadmin
2. Navigate to PageSideBar>Operators>OperatorHub
3. On the operator hub page scroll down and select the community checkbox under ProviderType.
4. Notice the operator tiles will have community badge
5. Click on a community operator tile and notice the modal has info about community operators.
6. Repeat the same steps with marketplace checkbox and see the same result.

attached are the screen shots.

Comment 8 Siva Reddy 2020-10-07 06:50:54 UTC
Created attachment 1719586 [details]
Screenshot of badges

Comment 9 Siva Reddy 2020-10-07 06:51:28 UTC
Created attachment 1719587 [details]
Screenshot of Community

Comment 10 Siva Reddy 2020-10-07 06:51:55 UTC
Created attachment 1719588 [details]
Screenshot of marketplace

Comment 12 errata-xmlrpc 2020-10-27 16:44:06 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


Note You need to log in before you can comment on or make changes to this bug.