Skip to content

Cost calculation troubleshooting #185

@JordanHoey96

Description

@JordanHoey96

Following the implementation of PR #183

The cost calculation is now failing as per previous action run - https://github.com/hmcts/auto-shutdown-dev/actions/runs/15559665180/job/43808579337

An example of one of the errors looks like a badRequest for an MS Graph Query:

RROR: {
"code": "BadRequest",
"message": "Please provide below info when asking for support: timestamp = 2025-06-10T12:38:07.8333917Z, correlationId = b74a31d0-6962-4cd9-9cd7-ecae133f2c7b.",
"details": [
{
"code": "InvalidQuery",
"message": "Query is invalid. Please refer to the documentation for the Azure Resource Graph service and fix the error before retrying."
},
{
"code": "ParserFailure",
"message": "ParserFailure",
"additionalProperties": {
"expectedToken": "'"
}
},
{
"code": "ParserFailure",
"message": "ParserFailure",
"additionalProperties": {
"expectedToken": "'"
}
},
{
"code": "ParserFailure",
"message": "ParserFailure",
"additionalProperties": {
"line": 6,
"token": "]"
}
}
]
}

As well as in the cost-calculator.py script, we are now seeing;

Invalid line format: VM,Standard_D8ds_v5,,Linux,47
Invalid line format: VM,Standard_D4ds_v5,,Linux,12
Invalid line format: VM,Standard_D16ds_v5,,Linux,1

Can you analyse whats wrong and propose a solution.
Perform tests to validate the fix.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions