Bug 1856867 - Form view for creating Operands does not allow creating empty JSON objects
Summary: Form view for creating Operands does not allow creating empty JSON objects
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.5.z
Assignee: Jon Jackson
QA Contact: Yadan Pei
: 1862558 (view as bug list)
Depends On: 1847921
TreeView+ depends on / blocked
Reported: 2020-07-14 15:35 UTC by Jon Jackson
Modified: 2020-09-24 13:56 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: When creating an operand, the form data was pruned when submitting or switching between form and yaml view. Consequence: If the template data included any empty objects, they would be pruned when submitting or switching. Fix: Use the template data as a "mask" when pruning empty structures from the form data. Only prune values that are not defined in the template. Result: Empty values that were defined in a template do not get pruned.
Clone Of: 1847921
Last Closed: 2020-08-17 20:05:57 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Github openshift console pull 5988 None closed [release-4.5] Bug 1856867: Do not prune empty values from sample on create operand page 2020-09-24 13:56:30 UTC
Red Hat Product Errata RHBA-2020:3330 None None None 2020-08-17 20:06:19 UTC

Comment 1 Samuel Padgett 2020-07-31 19:31:03 UTC
*** Bug 1862558 has been marked as a duplicate of this bug. ***

Comment 2 Jon Jackson 2020-07-31 19:56:15 UTC
PR is open, awaiting cherry pick approval.

Comment 5 Yanping Zhang 2020-08-10 09:08:25 UTC
Tested on OCP 4.5 cluster with payload 4.5.0-0.nightly-2020-08-08-162221.
1. Install AMQ Streams Operator
2. From the OpenShift console try to create an instance of Kafka resource. Update the `alm-example` section of the CSV to use empty objects for the `listeners.plain` and `listeners.tls` .
   alm-examples: |-
3. Checked the YAML view creation, there are `spec.kafka.listeners.plain:{}` and `spec.kafka.listeners.tls:{}` object
      plain: {}
      tls: {}
4. Switch to form view creation, there are kafka listeners fields, click "Create", instance is created successfully.
5. Checked the instance yaml, there are empty objects:
      plain: {}
      tls: {}

The bug is fixed.

Comment 7 errata-xmlrpc 2020-08-17 20:05:57 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 (OpenShift Container Platform 4.5.6 bug fix 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.


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