Bug 1966077

Summary: `hidden` descriptor is visible in the Operator instance details page`
Product: OpenShift Container Platform Reporter: Anshul Verma <ansverma>
Component: Management ConsoleAssignee: Jon Jackson <jonjacks>
Status: CLOSED ERRATA QA Contact: Xiyun Zhao <xiyuzhao>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: aos-bugs, jokerman, jonjacks, spadgett, yapei
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 23:10:35 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
Check the below portion of the ScreenShot none

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