Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1768542

Summary: Add 'snippet' to ConsoleYAMLSample CRD spec
Product: OpenShift Container Platform Reporter: Andrew Ballantyne <aballant>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: aos-bugs, jokerman, yanpzhan
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: Environment:
Last Closed: 2020-01-23 11:10:40 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:

Description Andrew Ballantyne 2019-11-04 16:53:20 UTC
Description of problem:
In late feature development of 4.3, the ConsoleYAMLSample was locked down to not allow any properties that were explicitly defined. This broke, among other things, the feature that allows for snippets to piggy-back on the ConsoleYAMLSample CRD to allow for insertions of partial samples.

The 'snippet' property should be an optional property as it's not needed for Samples to work.


Version-Release number of selected component (if applicable): 4.3


How reproducible: 100% - the spec disallows for additional properties now.


Steps to Reproduce:
1. Search for ConsoleYAMLSample CRD
2. Create a CR (the default Job example is fine)
3. Add 'snippet: true' to the spec and save

Actual results:
`snippet` is not a recognized field and is not allowed.


Expected results:
`snippet` to be accepted by the server and visible in the CR after saving / creating.

Additional info:

Comment 1 Samuel Padgett 2019-11-04 18:44:44 UTC
Moving back to assigned as we need to bump deps in the console-operator to pick up the change.

Comment 3 Yanping Zhang 2019-11-07 08:35:22 UTC
Tested on ocp 4.3 with payload 4.3.0-0.nightly-2019-11-06-184828. When created ConsoleYAMLSample crd with default yaml in which "snippet: true" was added, the example consoleyamlsample was created. And went to job create from yaml page, under "Sample" tab on the sidebar, there was "Insert Snippet" button, clicked on it, the sample yaml was inserted before the mouse cursor.

Comment 5 errata-xmlrpc 2020-01-23 11:10:40 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:0062