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

Bug 1736501

Summary: Reporting V2 Table API: 'columns' in results.values not in consistent order
Product: OpenShift Container Platform Reporter: David Taylor <dtaylor>
Component: Metering OperatorAssignee: Chance Zibolski <chancez>
Status: CLOSED NEXTRELEASE QA Contact: Peter Ruan <pruan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: sd-operator-metering
Target Milestone: ---   
Target Release: ---   
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: 2019-08-19 18:59:07 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:
Attachments:
Description Flags
Results of v2 Table API call none

Description David Taylor 2019-08-01 18:36:48 UTC
Created attachment 1598763 [details]
Results of v2 Table API call

Description of problem:

When calling the Reporting V2 Table API:

Ex: ../api/v2/reports/openshift-metering/namespace-cpu-usage/table?format=json

The returned results are not guaranteed to be in the same order.  For example, in the attached v2TableAPIresults.txt, the "pod_usage_cpu_core_seconds" is the last element in the first 'values' array, but the 3rd element in the second 'values' array.  This puts burden on app dev consumers to resort the results for consistency.


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

latest in v4.2

How reproducible:

always

Steps to Reproduce:
1. Install latest operating-metering
2. Execute the v2 Table url/api above
3. review the results

Actual results:


Expected results:


Additional info:

Comment 1 Chance Zibolski 2019-08-12 23:08:56 UTC
Got a PR up to fix this:

https://github.com/operator-framework/operator-metering/pull/895

Comment 2 Peter Ruan 2019-08-15 07:06:56 UTC
verified that all data rows have the same order.  Will need to add a testcase to check for this condition.

Comment 4 Chance Zibolski 2019-08-19 18:59:07 UTC
Verified by QE and the UI team which relies on this, so closing. Putting as "next release" since this will be officially available in OCP 4.2, despite the fix being available on the current master builds, etc.