Data source is not returning raw expenses data
This has been found on the SoftwareOne branch, so the examples refer to the SWO fork. A specific data source is showing expenses in the resource page table, but when you view that data-source's details page, the chart and table display a "no data to display" message.
Steps to reproduce the behavior: Using one of the SWO dev/staging/production environments. Navigate to Resources page and view AWS Marketplace Flexible Payment Terms Charge expenses. Click link to the resource details and view the expenses tab. View the expenses chart and table.
Expected behavior For the chart and table to display data that matches the expenses on the resource page.
Actual behaviour When you view that data-source's details page, the chart and table display a "no data to display" message.
Screenshots
Desktop (please complete the following information): Win11 + Version 141.0.7390.123 (Official Build) (64-bit)
Additional context The raw expenses get request is not returning any expenses:
Request URL: https://portal.finops.s1.today/restapi/v2/resources/64a9ad27-56d9-43f4-990f-d02184ced51a/raw_expenses?end_date=1762214399&start_date=1761955200 Request Method: GET
Response: { "start_date": 1761955200, "end_date": 1762214399, "total_cost": 0, "raw_expenses": [] }
Further information: There are 380943 raw_expenses on the database linked to this datasource.
Hello @SteveChurchillSWO We will try to reproduce the behavior you described on our test bench. I will let you know as soon as I get any conclusion.
Hello @SteveChurchillSWO We will try to reproduce the behavior you described on our test bench. I will let you know as soon as I get any conclusion.
If you have any difficulties, I will see if I can demonstrate it on our environment if I'm authorised to. I have a suspicion it maybe due to the quantity of expenses, as this is our largest data source.
Hello @SteveChurchillSWO Issue in raw_expenses API logic where raw expenses are not returned if start_date does not match start_date, end_date filters for these resources. This issue will be fixed in a future release. We will keep you posted as soon as this is fixed.
Hi @SteveChurchillSWO, this problem fixed in https://github.com/hystax/optscale/pull/773, you can built images from commit: b1073d898ad7e269e3b20650950346b1cf197680 and update cluster to apply changes