Bug 1402260 - OpenShift webconsole template Edit YAML action still shows JSON format partially
Summary: OpenShift webconsole template Edit YAML action still shows JSON format partially
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Jessica Forrester
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-07 07:01 UTC by Kenjiro Nakayama
Modified: 2020-02-14 18:15 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The object depth to which we would convert JSON format into YAML was limited. Consequence: After a certain point JSON notation would show up in the YAML editor. This was still valid YAML, but it was harder to read and edit. Fix: Removed the depth limitation during JSON to YAML conversion. Result: The entire contents that appears in Edit YAML will be converted from JSON format.
Clone Of:
Environment:
Last Closed: 2017-04-12 19:17:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screen shot of JSON format inside YAML through Edit YAML action for tempalte(other Resources) (115.97 KB, image/png)
2016-12-07 07:01 UTC, Kenjiro Nakayama
no flags Details
check-template (82.03 KB, image/png)
2017-01-23 10:43 UTC, Yanping Zhang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0884 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.5 RPM Release Advisory 2017-04-12 22:50:07 UTC

Description Kenjiro Nakayama 2016-12-07 07:01:07 UTC
Created attachment 1228900 [details]
screen shot of JSON format inside YAML through Edit YAML action for tempalte(other Resources)

Description of problem:
===
OpenShift webconsole template Edit YAML action still shows JSON format partially.

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

How reproducible(Steps to Reproduce):
===
1. oc create -f /usr/share/openshift/examples/xpaas-templates/eap64-sso-s2i.json
2. Goto console-> Resources-> Other Resources-> select Template-> eap64-sso-s2i-> Actions->Edit YAML

Actual results:
===
The template partially shows JSON format. Please see attached screenshot. (around livenessProbe and readinessProbe)

Expected results:
===
It should display with YAML format only.

Additional info:
===
Due to issue, users cannot copy&paste the template through web console.

Comment 1 Jessica Forrester 2016-12-07 15:14:18 UTC
JSON embedded in YAML is valid YAML.  There should be nothing wrong with using the template in this format. This is working as intended, once we get to a certain level of nested objects we have the editor switch to embedded JSON.

Comment 3 Jessica Forrester 2016-12-09 21:11:29 UTC
This was originally done because Edit YAML was in a modal dialog and had limited space. We can remove the restriction and have it fully parse into the block model.

Comment 4 openshift-github-bot 2016-12-09 22:09:37 UTC
Commit pushed to master at https://github.com/openshift/origin-web-console

https://github.com/openshift/origin-web-console/commit/bb8691174d7c7033a8dab17d8b47ad9bf73c1f9b
Bug 1402260 remove nesting limitation from json to yaml parsing

Comment 7 Troy Dawson 2017-01-20 23:31:33 UTC
This has been merged into ocp and is in OCP v3.5.0.7 or newer.

Comment 8 Yanping Zhang 2017-01-23 10:43:49 UTC
Created attachment 1243536 [details]
check-template

Comment 9 Yanping Zhang 2017-01-23 10:45:48 UTC
Tested on OCP v3.5.0.7.
1.Create template in project:
oc create -f origin/examples/sample-app/application-template-stibuild.json
2.From other resource page choose template "ruby-helloworld-sample", check edit yaml. There is no JSON embedded in YAML, and even update with JSON embedded in YAML and save, check edit yaml again, it's still in yaml format.

Are these the right steps to check the fix? I upload a screenshot "check-template" as well. If it's not enough, pls help point out the steps, thanks!

Comment 10 Jessica Forrester 2017-01-23 13:46:15 UTC
That sounds like the right verification steps

Comment 11 Yanping Zhang 2017-01-24 06:15:20 UTC
Thanks, Jessica.

Comment 13 errata-xmlrpc 2017-04-12 19:17:44 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-2017:0884


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