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.
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:
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
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