oracle / oracle/oci-python-sdk

Some times OCI usage api currency getting empty

Open
#771 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Usage
Dominant language
Python
Stars
474
Forks
321
Avg merge
23m
Merged PRs (30d)
4

Description

I am facing an issue with the Usage API currency field. Sometimes, the currency value returns as None. Please let me know if any changes are required—I will make them accordingly.
@adizohar

{
  "ad": null,
  "attributed_cost": "0",
  "attributed_usage": "0",
  "compartment_id": null,
  "compartment_name": "Infolob",
  "compartment_path": null,
  "computed_amount": 0.93,
  "computed_quantity": 0.0,
  "currency": " ",
  "discount": null,
  "is_forecast": false,
  "list_rate": null,
  "overage": null,
  "overages_flag": null,
  "platform": null,
  "region": null,
  "resource_id": "ocid1.bootvolume.oc1.ap-hyderabad-1.abuhsljrv776x6swqtdpzskszcrs6dni6i4pmm755sp4pylg34twke2h2rqa",
  "resource_name": null,
  "service": "Block Storage",
  "shape": null,
  "sku_name": null,
  "sku_part_number": null,
  "subscription_id": null,
  "tags": [
    {
      "key": null,
      "namespace": null,
      "value": null
    }
  ],
  "tenant_id": null,
  "tenant_name": null,
  "time_usage_ended": "2025-06-0500:00:00+00:00",
  "time_usage_started": "2025-06-04T00:00:00+00:00",
  "unit": null,
  "unit_price": null,
  "weight": null
}
--------
{
  "ad": null,
  "attributed_cost": "0",
  "attributed_usage": "0",
  "compartment_id": null,
  "compartment_name": "Infolob",
  "compartment_path": null,
  "computed_amount": null,
  "computed_quantity": 0.0,
  "currency": " ",
  "discount": null,
  "is_forecast": false,
  "list_rate": null,
  "overage": null,
  "overages_flag": null,
  "platform": null,
  "region": null,
  "resource_id": "ocid1.bootvolume.oc1.ap-hyderabad-1.abuhsljrv776x6swqtdpzskszcrs6dni6i4pmm755sp4pylg34twke2h2rqa",
  "resource_name": null,
  "service": "Block Storage",
  "shape": null,
  "sku_name": null,
  "sku_part_number": null,
  "subscription_id": null,
  "tags": [
    {
      "key": null,
      "namespace": null,
      "value": null
    }
  ],
  "tenant_id": null,
  "tenant_name": null,
  "time_usage_ended": "2025-06-04T00:00:00+00:00",
  "time_usage_started": "2025-06-03T00:00:00+00:00",
  "unit": null,
  "unit_price": null,
  "weight": null
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file, test, or entry point is named. Start by reproducing the OCI Usage API response and tracing whether the blank currency originates in the service response or SDK handling; done means identifying the source and the expected currency behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.