Bug 1779681
| Summary: | Try It button for ConsoleYAMLSample resources silently fails on invalid YAML | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Robb Hamilton <rhamilto> |
| Component: | Management Console | Assignee: | Samuel Padgett <spadgett> |
| Status: | CLOSED ERRATA | QA Contact: | Yadan Pei <yapei> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.3.0 | CC: | aos-bugs, bparees, bpeterse, hasha, jokerman, spadgett, yapei |
| Target Milestone: | --- | ||
| Target Release: | 4.3.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1776479 | Environment: | |
| Last Closed: | 2020-01-23 11:17:47 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: | 1776479 | ||
| Bug Blocks: | 1778863 | ||
|
Description
Robb Hamilton
2019-12-04 13:55:18 UTC
*** Bug 1778863 has been marked as a duplicate of this bug. *** $ oc create -f console.yaml The ConsoleYAMLSample "foo-pod-example" is invalid: * spec.description: Required value * spec.title: Required value * spec.yaml: Required value Veirfy this bug 4.3.0-0.nightly-2019-12-04-214544 The original YAML example in the description isn't the right YAML to check. You need to use the following example. The fix is to show a modal error message in the console when a user tries to apply it (since the `yaml` property is not valid YAML). Moving back to ON_QA.
```
apiVersion: console.openshift.io/v1
kind: ConsoleYAMLSample
metadata:
name: foo-pod-example
spec:
targetResource:
apiVersion: v1
kind: Pod
title: foo pod example
description: our company's preferred foo pod
yaml: >-
apiVersion: v1
kind: Pod
metadata:
name: foo-pod-example
labels:
app: web
foo: bar
bar: baz
spec:
containers:
- name: foo-pod-example
image: foopod/example
command: ["foo"]
args: ["--example", "1"]
```
Got bellow error when apply wrong yaml template: Failed to Parse YAML Sample incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line at line 1, column 20: apiVersion: v1 kind: Pod metadata: ^ 4.3.0-0.nightly-2019-12-05-213858 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:0062 |