Bug 1797727 - Invalid descriptor prevents operand details from displaying
Summary: Invalid descriptor prevents operand details from displaying
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.4.0
Assignee: Samuel Padgett
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks: 1798130
TreeView+ depends on / blocked
 
Reported: 2020-02-03 18:24 UTC by Samuel Padgett
Modified: 2020-05-13 21:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, the console would fail to show an operand if an invalid OLM descriptor was set by an operator. The console now tolerates invalid descriptors and will show the operand details.
Clone Of:
: 1798130 (view as bug list)
Environment:
Version: 4.3.0-0.ci-2020-01-29-133443 Cluster ID: 2ebfb326-d1fe-4061-a5ce-2858a7a90cf6 Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:72.0) Gecko/20100101 Firefox/72.0
Last Closed: 2020-05-13 21:58:50 UTC
Target Upstream Version:


Attachments (Terms of Use)
JS Console Error (425.29 KB, image/png)
2020-02-21 07:35 UTC, Yadan Pei
no flags Details


Links
System ID Priority Status Summary Last Updated
Github openshift console pull 4160 None closed Bug 1797727: add error boundary around OLM descriptors 2020-07-07 19:56:50 UTC
Red Hat Product Errata RHBA-2020:0581 None None None 2020-05-13 21:58:52 UTC

Description Samuel Padgett 2020-02-03 18:24:26 UTC
Steps to reproduce:

    install the Crunchy PostgeSQL for OpenShift operator
    create a new Postges primary cluster member CR using the default spec
    navigate to `all instances` and click the `(P) example` link for the resource that was just created:
    eg URL:
    http://localhost:9000/k8s/ns/pgo/clusterserviceversions/postgresoperator.v4.2.1/crunchydata.com~v1~Pgcluster/example

Observed behavior:
Error: `Oh no! Something went wrong.`
Page fails to load completely.

Invariant Violation: Objects are not valid as a React child (found: object with keys {accessmode, fsgroup, matchLabels, name, size, storageclass, storagetype, supplementalgroups}). If you meant to render a collection of children, use an array instead.
    in span (created by Label)
    in Label (created by SpecDescriptor)
    in dd (created by SpecDescriptor)
    in dl (created by SpecDescriptor)
    in SpecDescriptor

Comment 3 Yadan Pei 2020-02-07 08:34:24 UTC
Hi Sam,

I can't get a successful Crunchy PostgeSQL for OpenShift operator installed on my cluster, tried several times. The installplan always failed

Do you have cluster with it enabled then I can verify the fix?

Comment 4 Samuel Padgett 2020-02-20 19:59:19 UTC
You can reproduce by manually editing the ClusterServiceVersion of another operator. For instance, I could reproduce with these steps:

1. Install 3scale 0.4.1 from OperatorHub
2. Navigate to the Installed Operator details
3. Change to YAML tab
4. Search for the "Wildcard Domain" spec descriptor
5. Edit path to be "system" and save
6. Create an API Manager and view its details

Previously, the page would crash. Now it just skips the descriptor on the details page.

You can verify there was an error (that was skipped) by looking at the JS console, which should have a message like:

Invariant Violation: "Objects are not valid as a React child (found: object with keys {appSpec, database, fileStorage, sidekiqSpec}).

(I'm removing the depends on because the bot will block us from backporting the fix if we're able to verify this way. It's not really specific to the Crunchy PostgeSQL operator.)

Comment 5 Yadan Pei 2020-02-21 07:35:52 UTC
Created attachment 1664632 [details]
JS Console Error

Follow the steps Sam told above, viewing 'API Manager' details page will not crash, JS errors are listed as in screenshot

Comment 6 Yadan Pei 2020-02-21 07:37:48 UTC
Error: "Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7BappSpec%2C%20database%2C%20fileStorage%2C%20sidekiqSpec%7D&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings. "

I think this issue has been fixed based on comment 0 and comment 4, move to VERIFIED please let me know if it's wrong


Verified on     4.4.0-0.nightly-2020-02-20-215232

Comment 8 errata-xmlrpc 2020-05-13 21:58:50 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:0581


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