Bug 1835938

Summary: Operands related views are disappeared due to missing Operand's `displayName` field in the CSV
Product: OpenShift Container Platform Reporter: tony.wu
Component: Management ConsoleAssignee: Cyril <cajieh>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.5CC: aos-bugs, bpeterse, jokerman, yapei
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Code error Consequence: Fix: Yes Result: Works as expected
Story Points: ---
Clone Of:
: 1835939 (view as bug list) Environment:
Last Closed: 2020-07-13 17:39:04 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:
Bug Depends On: 1842968    
Bug Blocks: 1835939    
Attachments:
Description Flags
1_List-view___missing_provided-api.png
none
2_Details-view___missing_provided-api_Name__missing_Operand_tabs_and_Operand_list-view.png
none
V1-List View has Provided APIs
none
V2-Details View-Missing Operand Tab none

Description tony.wu 2020-05-14 18:52:15 UTC
Created attachment 1688585 [details]
1_List-view___missing_provided-api.png

Description of problem:
Reported by Red Hat Quay Operator. 
Due to a missing `displayName` field of the "owned CRD" in the CSV file, all Operands related view (including entry links) in Console are disappeared.

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

How reproducible:
100%

Steps to Reproduce:
1. Go to "OperatorHub" view, installed "Red Hat Quay" Operator to any NS.
2. Go to "Installed Operators" view <--- provided API field is missing
3. Go to "Red Hat Quay" Operator details view <--- provided API display name is missing and Operand's tab for Operand list view is missing

(*please double check if "Red Hat Quay" Operator still missing the `spec.customresourcedefinitions.owned[INDEX].displayName` in the CSV for reproducing this)

Actual results:
On "Installed Operators" view <--- provided API field is missing
On "Red Hat Quay" Operator details view <--- provided API display name is missing and Operand's tab for Operand list view is missing

Expected results:
Console could provide a safe fallback: 
IF CSV's `spec.customresourcedefinitions.owned[INDEX].displayName` is missing
THEN 
use `spec.customresourcedefinitions.owned[INDEX].kind` instead     

Since the `displayName` of the owned CRD is a non-required field in CSV's schema, but `kind` field is a required field.

Additional info:

Comment 1 tony.wu 2020-05-14 18:52:32 UTC
Created attachment 1688586 [details]
2_Details-view___missing_provided-api_Name__missing_Operand_tabs_and_Operand_list-view.png

Comment 5 Yadan Pei 2020-06-01 06:42:00 UTC
1. Build customized operator image
2. Create customized catalog source so that the operator will be available in OperatorHub
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: custom-console-catalogsource-infrasubs
  namespace: openshift-marketplace
spec:
  sourceType: grpc
  image: quay.io/yapei/quay-operator:missingdisplayName 
  displayName: Custom UI Auto Console Testing
  publisher: OpenShift UI QE

3. Subscribe the customized operator and wait until it is succeessful
# oc get csv -n yapei1-2 
NAME                                  DISPLAY                        VERSION   REPLACES   PHASE
quay.v1.0.2                           Quay                           1.0.2                Succeeded
4. Confirm `spec.customresourcedefinitions.owned[INDEX].displayName` is missing in CSV

# oc get csv quay.v1.0.2 -n yapei1-2 -o json | jq '.spec.customresourcedefinitions'
{
  "owned": [
    {
      "description": "Resources to support the Quay Container Registry and supporting components",
      "kind": "QuayEcosystem",
      "name": "quayecosystems.redhatcop.redhat.io",
      "resources": [
        {
          "kind": "Service",
          "name": "",
          "version": "v1"
        },
        {
          "kind": "Secret",
          "name": "",
          "version": "v1"
        },
        {
          "kind": "Pod",
          "name": "",
          "version": "v1"
        },
        {
          "kind": "ConfigMap",
          "name": "",
          "version": "v1"
        },
        {
          "kind": "Route",
          "name": "",
          "version": "v1"
        }
      ],
      "version": "v1alpha1"
    }
  ]
}
5. Check Installed Operators list page, Provided APIs show 'QuayEcosystem' which is correct
6. Check Operator Details page via Installed Operators -> click 'Red Hat Quay', Provided APIs is showing correct name 'QuayEcosystem', but console doesn't show a 'QuayEcosystem' operand tab from where user can create QuayEcosystem instance


This is checked against 4.5.0-0.nightly-2020-05-30-025738

Comment 6 Yadan Pei 2020-06-01 06:42:49 UTC
Created attachment 1694021 [details]
V1-List View has Provided APIs

Comment 7 Yadan Pei 2020-06-01 06:43:37 UTC
Created attachment 1694022 [details]
V2-Details View-Missing Operand Tab

Comment 8 Cyril 2020-06-02 13:24:25 UTC
Opened another bug to address the issue 'Operand's tab for Operand list view is missing' - https://bugzilla.redhat.com/show_bug.cgi?id=1842968

Comment 9 bpeterse 2020-06-02 18:30:22 UTC
I think that means this bug is addressed via the PR.  Putting it back ON_QA to verify, so that the separate issue can be handled in that separate bug.

Comment 10 Yadan Pei 2020-06-03 02:03:49 UTC
Ok, moving this bug to Verified since the issue has already been verified in comment 5

Comment 11 errata-xmlrpc 2020-07-13 17:39:04 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, 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:2409