Bug 1976072 - Operand details page doesn't render correct format when x-descriptor path has None value
Summary: Operand details page doesn't render correct format when x-descriptor path has...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.9.0
Assignee: Jon Jackson
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-25 06:39 UTC by Yadan Pei
Modified: 2021-10-18 17:37 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Front-end OLM descriptor handling only uses the first x-descriptor to render a property on an operand details page. Consequence: If multiple x-descriptors are defined for a property and the first one in the list is invalid or unsupported it would not render as expected even if a valid and supported x-descriptor was defined further down the list. Fix: Update our descriptor validation logic to prioritize supported x-descriptors over unsupported ones. Result: Descriptor-decorated properties will be rendered on the operand details page using the first valid and supported x-descriptor found in the list.
Clone Of:
Environment:
Last Closed: 2021-10-18 17:36:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
operand details page 4.8 (140.64 KB, image/png)
2021-06-25 06:39 UTC, Yadan Pei
no flags Details
operand details page 4.6 (178.34 KB, image/png)
2021-06-25 06:41 UTC, Yadan Pei
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 9530 0 None open Bug 1976072: Ensure supported details view x-descriptors take priority in Operand details view 2021-07-15 17:52:36 UTC
Red Hat Product Errata RHSA-2021:3759 0 None None None 2021-10-18 17:37:08 UTC

Description Yadan Pei 2021-06-25 06:39:09 UTC
Created attachment 1794268 [details]
operand details page 4.8

Description of problem:
when some fields value is None, we didn't display an edit option to change them on operand details page

Version-Release number of selected component (if applicable):
4.8.0-0.nightly-2021-06-24-101028

How reproducible:
Always

Steps to Reproduce:
1. Install 'Argo CD' operator and create 'Argo CD' operand using default YAML or default form
2. Check 'Argo CD' operand details page
3.

Actual results:
2. some fields Controller.Resource Requirement and Grafana.Size, we didn't set value for them, the specDescriptors are:
          - description: >-
              The limits and requests requirements for the Argo CD Application
              Controller container.
            displayName: Resource Requirements
            path: controller.resources
            x-descriptors:
              - 'urn:alm:descriptor:com.tectonic.ui:fieldGroup:Controller'
              - 'urn:alm:descriptor:com.tectonic.ui:resourceRequirements'
          - description: The replica count for the Grafana Deployment.
            displayName: Size
            path: grafana.size
            x-descriptors:
              - 'urn:alm:descriptor:com.tectonic.ui:fieldGroup:Grafana'
              - 'urn:alm:descriptor:com.tectonic.ui:podCount'
On operand details page, we didn't render Resource Requirement edit modal and Pod count edit option

Expected results:
2. Although these fields have None value, we should still render with correct format then user can edit on operand details page like what we did in OCP 4.6

Additional info:

Comment 1 Yadan Pei 2021-06-25 06:41:02 UTC
Created attachment 1794269 [details]
operand details page 4.6

Comment 2 Jon Jackson 2021-07-02 20:20:30 UTC
Haven't had a chance to reproduce this or work on it. Will address in an upcoming sprint.

Comment 3 Jon Jackson 2021-07-21 14:15:30 UTC
PR is open, pending review.

Comment 6 Yadan Pei 2021-08-17 08:12:35 UTC
1. Install Prometheus Operator 0.47.0, then create Prometheus instance with default YAML
2. Check Prometheus operand details, on operand details page, Resource Requirement edit modal is shown although Resource Requirement has all None values
Pod count edit option is also shown correctly so that user can edit the pod count

Verified on 4.9.0-0.nightly-2021-08-16-154237

Comment 7 Yadan Pei 2021-08-18 10:18:46 UTC
when pod count is null, operand details also render a edit option so that user can update the count

Comment 10 errata-xmlrpc 2021-10-18 17:36:51 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.9.0 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:3759


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