Bug 1736501 - Reporting V2 Table API: 'columns' in results.values not in consistent order
Summary: Reporting V2 Table API: 'columns' in results.values not in consistent order
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Metering Operator
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Chance Zibolski
QA Contact: Peter Ruan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-01 18:36 UTC by David Taylor
Modified: 2019-08-19 18:59 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-19 18:59:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Results of v2 Table API call (1.85 KB, text/plain)
2019-08-01 18:36 UTC, David Taylor
no flags Details

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.


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