Bug 1966077 - `hidden` descriptor is visible in the Operator instance details page`
Summary: `hidden` descriptor is visible in the Operator instance details page`
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.8.0
Assignee: Jon Jackson
QA Contact: Xiyun Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-31 11:00 UTC by Anshul Verma
Modified: 2021-07-27 23:10 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The logic used to group nested descriptors on the operand details pages did not account for hidden descriptors at the top level. Consequence: Object-type details items that had a hidden descriptor defined would sometimes be rendered as empty objects on the operand details page. Fix: Update the operand details page grouping logic to omit hidden object properties. Result: Object properties with a hidden descriptor are no longer rendered on the operand details page.
Clone Of:
Environment:
Last Closed: 2021-07-27 23:10:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Check the below portion of the ScreenShot (16.62 KB, image/png)
2021-05-31 11:00 UTC, Anshul Verma
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 9168 0 None open Bug 1966077: Don't show empty hidden fields on operand details page 2021-06-07 19:04:52 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:10:48 UTC

Description Anshul Verma 2021-05-31 11:00:44 UTC
Created attachment 1788212 [details]
Check the below portion of the ScreenShot

Description of problem:

An object(struct)'s nested field with 'hidden' descriptor in it's CSV should hide it in the operator instance creation form on the OpenShift Console.
But when the instance is created without any value to that, it is still visible in the detail page of the instance as a blank field.


How reproducible:
Always.

Steps to Reproduce:
1. Create an Operator through Operator-SDK with the following changes in the api's property file -
~~~
type myObject struct {

    // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="myObject",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:hidden"}
    // +optional
    MyString string `json:"storage,omitempty"`
}

--
--
// MemcachedSpec defines the desired state of Memcached
type MemcachedSpec struct {
    // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
    // Important: Run "make" to regenerate code after modifying this file

    Size int32 `json:"size"`

    // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="JRS",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:hidden"}
    // +optional
    Obj myObject `json:"myObj"`
}
~~~
2. Deploy the operator on OpenShift.

3. Change the csv to have -
~~~
      specDescriptors:
      - displayName: JRS
        path: Obj
        x-descriptors:
        - urn:alm:descriptor:com.tectonic.ui:hidden
      - displayName: myObject
        path: Obj.MyString
        x-descriptors:
        - urn:alm:descriptor:com.tectonic.ui:hidden
~~~

Comment 1 Anshul Verma 2021-06-06 08:46:58 UTC
Any updates on this?

Comment 7 errata-xmlrpc 2021-07-27 23:10:35 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.8.2 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:2438


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