Bug 1856867
| Summary: | Form view for creating Operands does not allow creating empty JSON objects | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Jon Jackson <jonjacks> |
| Component: | Management Console | Assignee: | Jon Jackson <jonjacks> |
| Status: | CLOSED ERRATA | QA Contact: | Yadan Pei <yapei> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.5 | CC: | aos-bugs, jokerman, jscholz, mukul.panwar, spadgett, swoodman, xiaocwan, yanpzhan, yapei |
| Target Milestone: | --- | ||
| Target Release: | 4.5.z | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| 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.
|
Story Points: | --- |
| Clone Of: | 1847921 | Environment: | |
| Last Closed: | 2020-08-17 20:05:57 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1847921 | ||
| Bug Blocks: | |||
|
Comment 1
Samuel Padgett
2020-07-31 19:31:03 UTC
PR is open, awaiting cherry pick approval. 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: |-
[
{
"apiVersion":"kafka.strimzi.io/v1beta1",
"kind":"Kafka",
"metadata":{
"name":"my-cluster"
},
"spec":{
"kafka":{
"version":"2.5.0",
"replicas":3,
"listeners":{
"plain":{
},
"tls":{
}
},
--
3. Checked the YAML view creation, there are `spec.kafka.listeners.plain:{}` and `spec.kafka.listeners.tls:{}` object
listeners:
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:
listeners:
plain: {}
tls: {}
The bug is fixed.
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. https://access.redhat.com/errata/RHBA-2020:3330 |