Uploaded image for project: 'Cost Management'
  1. Cost Management
  2. COST-4121

Investigate hard coded units in our provider maps

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • March 2024, 2024Q1
    • None
    • API
    • 5
    • False
    • None
    • False

      Target Dates

      Dev Target Date: 2/2/24
      Test Target Date: 2/9/2024
      Release Target Date: 2/9/2024

      This issue is to investigate the units we are using in our provider maps. Sometimes we hard code units, other times we provide fallback units for if the units were not available in the csv file. This issue is to investigate and validate that the units we show either through hard coding or as fallback are correct for the data that is in the usage column.

      For example, this bug was initially raised for OCP after we discovered that we had hard coded the units to be GB, but the actual numbers for compute & memory are calculated using GiB. We decided it would be a good opportunity to ensure that all of our hard coded units are correct within our API.

      The following is examples on where we set these units:
      1. https://github.com/project-koku/koku/blob/main/koku/api/report/ocp/provider_map.py#L483-L484

      Different ways that we hard code units:

      "usage_units": Coalesce(Max("unit"), Value("GB-Mo")),
      "usage_units_fallback": "GB-Mo",
      "usage_units": Value("Core-Hours", output_field=CharField()),
      "usage_units_key": "GB-Hours",
       "count_units_key": "GB",
      

              rh-ee-lbacciot Lucas Bacciotti
              myersco Cody Myers
              Eva Šebestová Eva Šebestová
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: