Bug 1753124

Summary: Example Report Query YAML lack of required fields
Product: OpenShift Container Platform Reporter: Yadan Pei <yapei>
Component: Management ConsoleAssignee: David Taylor <dtaylor>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: medium    
Version: 4.2.0CC: aos-bugs, jokerman, pruan, spadgett
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:
Cause: Basic yaml example didn't have all required fields for Report Query. Consequence: When user attempted to create report query using basic yaml example, it resulted in error message Fix: Created a new yaml example specifically for Report Query which contains all required fields. Result: Example Report Query is created without any errors.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-23 11:06:16 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 Yadan Pei 2019-09-18 07:39:16 UTC
Description of problem:
When user tries to create Report Query using example YAML, it will report error "spec.columns in body is required
spec.query in body is required" for field "[]"."
It would be good if we can add required fields in example YAML

Version-Release number of selected component (if applicable):
4.2.0-0.nightly-2019-09-17-001320

How reproducible:
Always

Steps to Reproduce:
1. cluster admin enable Metering
2. visit Chargeback -> Report Queries tab
3. click 'Create Report Query' button -> then Create

Actual results:
3. Error message returned:
An error occurred
Error "Invalid value: map[string]interface {}{"apiVersion":"metering.openshift.io/v1alpha1", "kind":"ReportQuery", "metadata":map[string]interface {}{"creationTimestamp":"2019-09-18T07:11:22Z", "generation":1, "name":"example", "namespace":"openshift-metering", "uid":"852a0c85-d9e3-11e9-b782-0050568b3449"}, "spec":map[string]interface {}{}}: validation failure list:
spec.columns in body is required
spec.query in body is required" for field "[]".

Expected results:
3. it would be good if we can add all required fields in default YAML

Additional info:

Comment 3 Peter Ruan 2019-10-25 22:31:09 UTC
verified on 4.2.2 stable image.

I can create a report using the example template.

Comment 5 errata-xmlrpc 2020-01-23 11:06:16 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