Bug 1787503 - yaml editor does not validate object spelling from resource schema
Summary: yaml editor does not validate object spelling from resource schema
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 4.5.0
Assignee: Robb Hamilton
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-03 06:57 UTC by XiaochuanWang
Modified: 2020-07-13 17:13 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The YAML editor does not check for the presence of the required `metadata` field. Consequence: If the field is not found or is misspelled, a javascript console error is thrown upon clicking `Save`, but there is no direct feedback to the end user there is an issue. Fix: Add an error handler that checks for `metadata` and display an error on the page alerting the user to the issue if it is missing or misspelled. Result: The user now gets helpful feedback upon clicking `Save` if `metadata` is missing or misspelled in the YAML.
Clone Of:
Environment:
Last Closed: 2020-07-13 17:13:00 UTC
Target Upstream Version:


Attachments (Terms of Use)
Verification screenshot (161.72 KB, image/png)
2020-05-13 08:51 UTC, XiaochuanWang
no flags Details


Links
System ID Priority Status Summary Last Updated
Github openshift console pull 5413 None closed Bug 1787503: Add error if `metadata` not found in YAML 2020-08-12 11:35:34 UTC
Red Hat Product Errata RHBA-2020:2409 None None None 2020-07-13 17:13:16 UTC

Description XiaochuanWang 2020-01-03 06:57:46 UTC
Description of problem:
When user create resource by yaml editor and misspelling necessary field, it does not raise any error message when user click Create button which is still enable.

Version-Release number of selected component (if applicable):
4.3.0-0.nightly-2020-01-03-005054

How reproducible:
always

Steps to Reproduce:
1. User browse to create a resource such as Pod by yaml editor.
2. Misspell something such as "Metadata" to "Matadata" 
3. Check and click the Create button

Actual results:
3. Create button is enable to click. It does not raise any error when user click Create and the creation is not started.

Expected results:
3. Either the Create button is in disabled, or there should be an error message

Additional info:

Comment 1 Robb Hamilton 2020-05-07 15:48:49 UTC
Move to upcoming sprint as there are many bugs.

Comment 4 XiaochuanWang 2020-05-13 08:50:33 UTC
This could be Verified now.
Checked different typo for "metadata", "name", "spec", "containers" independently on Pod creation editor, error message shows friendly when user hit Create.
Verified on 4.5.0-0.nightly-2020-05-13-043728

Comment 5 XiaochuanWang 2020-05-13 08:51:08 UTC
Created attachment 1687992 [details]
Verification screenshot

Comment 7 errata-xmlrpc 2020-07-13 17:13:00 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.