Bug 1787503

Summary: yaml editor does not validate object spelling from resource schema
Product: OpenShift Container Platform Reporter: XiaochuanWang <xiaocwan>
Component: Management ConsoleAssignee: Robb Hamilton <rhamilto>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: medium    
Version: 4.3.0CC: aos-bugs, jokerman
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-13 17:13:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Verification screenshot none

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