Bug 1772694 - default template for metering report for editor should use v1 instead of v1apha1
Summary: default template for metering report for editor should use v1 instead of v1apha1
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.4.0
Assignee: David Taylor
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks: 1775719 1775720 1776339
TreeView+ depends on / blocked
 
Reported: 2019-11-14 21:37 UTC by Peter Ruan
Modified: 2020-05-04 11:16 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Administration -> Chargeback -> Create Reports & Create Report Query templates should use apiVersion `v1` instead of `v1alpha`. Reason: The resulting report/report-query can still be generated using `v1alpha` but we should use the proper versioning going forward in case support for `v1apha1` is dropped. Result: Fixed templates to use: 'apiVersion: metering.openshift.io/v1'
Clone Of:
: 1775719 1776339 (view as bug list)
Environment:
Last Closed: 2020-05-04 11:15:35 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 3478 0 'None' closed Bug 1772694: default template for metering report for editor should use v1 2020-04-25 17:44:34 UTC
Red Hat Product Errata RHBA-2020:0581 0 None None None 2020-05-04 11:16:06 UTC

Description Peter Ruan 2019-11-14 21:37:01 UTC
Description of problem:
The default report and ReportQuries generated by the UI that populated the UI editor should ue `v1` instead of `v1alpha``.  The resulting report can still be generated but we should use the proper versioning going forward in case support for `v1apha1` is dropped.

Version-Release number of selected component (if applicable):
OCP >= 4.2

How reproducible:
always

Steps to Reproduce:
1.  Have metering installed.
2.  Administration->Chargeback
3.  Click on Create / CreateReportQuery
4.  The default template will show that it's using `v1alpha1`

This applies to creating a Report as well as ReportQuery
https://github.com/openshift/console/blob/41940c686cf55c8ed6331b539c9f78b8f49d174b/frontend/public/models/yaml-templates.ts#L200

https://github.com/openshift/console/blob/41940c686cf55c8ed6331b539c9f78b8f49d174b/frontend/public/models/yaml-templates.ts#L212

Actual results:
apiVersion: metering.openshift.io/v1alpha1

Expected results:
apiVersion: metering.openshift.io/v1


Additional info:

Comment 2 Yadan Pei 2019-11-26 09:58:52 UTC
Enable Metering, visit Administration -> Chargeback -> click on Create Reports & Create Report Query button

apiVersion: metering.openshift.io/v1
kind: ReportQuery
metadata:
  name: example
  namespace: openshift-metering
spec:
  columns:
    - name: the_time
      type: timestamp
  query: |
    SELECT now() AS the_time;


apiVersion: metering.openshift.io/v1
kind: Report
metadata:
  name: namespace-memory-request
  namespace: openshift-metering
spec:
  query: namespace-memory-request
  reportingStart: '2019-01-01T00:00:00Z'
  reportingEnd: '2019-12-30T23:59:59Z'
  runImmediately: true


Now they're using metering.openshift.io/v1 version 

Verified on 4.4.0-0.nightly-2019-11-26-041012

Comment 4 errata-xmlrpc 2020-05-04 11:15:35 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:0581


Note You need to log in before you can comment on or make changes to this bug.