Bug 1821432 - Toggle controls in OLM CR details page do not update the CR correctly
Summary: Toggle controls in OLM CR details page do not update the CR correctly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.3.z
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.5.0
Assignee: Cyril
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-06 19:50 UTC by Rob Cernich
Modified: 2023-10-06 19:36 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: coding error and missing requirement Consequence: Fix: Fixed Result: Working as expected.
Clone Of:
Environment:
Last Closed: 2020-07-13 17:25:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 5083 0 None closed Bug 1821432: Toggle controls in OLM CR details page do not update the CR correctly 2021-01-28 21:15:19 UTC
Red Hat Issue Tracker MAISTRA-1336 0 Minor Done When updating SMCP Control Plane Security from a UI switch , the UI is not consistent with the status of SMCP yaml 2020-10-29 20:42:10 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:26:05 UTC

Description Rob Cernich 2020-04-06 19:50:08 UTC
Description of problem:

When toggling a control bound to a boolean field in a CR, the wrong field in the CR is updated.

For example, the control is bound to "istio.global.mtls.enabled" and the control is setting:

istio:
  global.mtls.enabled: true

It should be setting:

istio:
  global:
    mtls:
      enabled: true


Version-Release number of selected component (if applicable):

4.3.9


How reproducible:

Always


Steps to Reproduce:
1.
2.
3.

Actual results:

istio:
  global.mtls.enabled: true

Expected results:

istio:
  global:
    mtls:
      enabled: true

Additional info:

Comment 1 Yuanlin Xu 2020-04-06 19:54:19 UTC
We see same issue in OCP 4.4.0-rc.6 as well.

Comment 2 Cyril 2020-04-07 17:21:56 UTC
Steps to Reproduce is missing, please provide.

Comment 3 Rob Cernich 2020-04-07 17:56:10 UTC
Any CSV that includes a custom resource with UI annotations that map to a nested field, more than two levels deep.  You can use the OpenShift Service Mesh operator, then create a Service Mesh Control Plane.  After it's created try toggling one of the fields, e.g. Install Kiali.  Notice it spins forever after pressing confirm.  Switch to yaml view and notice it created a spec: { istio: { kiali.enabled: true } } instead of spec: { istio: { kiali: { enabled: true } } }.

I'd suggest writing a unit test to reproduce the behavior.

Comment 4 Yuanlin Xu 2020-04-07 18:08:06 UTC
Here is an example of "Steps to Reproduce:"
1. Create a OCP4.3 or 4.4.0 cluster
2. Install an operator which include a custom resource with UI annotations that map to a nested field, more than two levels deep. 

As an example, we can use the OpenShift Service Mesh operator.
3. Create a Service Mesh Control Plane from the "Installed operators" --> OpenShift Service Mesh operator
4. Navigate UI page "Installed operators" --> OpenShift Service Mesh operator --> All instances --> basic-install -->  Service Mesh Control Plane Overview
5. Toggling any of the Toggle control. Click "change confirmed" right next to the Toggle control

Problem results:
1. It spins forever after pressing confirm
2. Switch to yaml view and notice it created a spec: { istio: { kiali.enabled: true } } instead of spec: { istio: { kiali: { enabled: true } } }.

Expected behaviour:
1. The Toggle control should not spins forever after perssing confirm
2. The yaml changes should be updated in a correct way in the description above.

Comment 7 Yanping Zhang 2020-05-09 03:03:42 UTC
Checked on ocp 4.5 cluster with payload 4.5.0-0.nightly-2020-05-08-200452.
Install OpenShift Service Mesh operator, then create an ServiceMeshControlPlanes instance, check the instance yaml, it shows istio->kiali in spec correctly:
  istio
    kiali:
      enabled: true
On the instance detail page, change panel control for kiali to false, click "Confirm change", it takes effect after a while, and the yaml shows istio->kiali in spec correctly:
  istio:
    kiali:
      enabled: false

Comment 9 errata-xmlrpc 2020-07-13 17:25:52 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


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