Fix cost calculation failures: Azure Graph query syntax and data parsing issues#186
Merged
JordanHoey96 merged 4 commits intomasterfrom Jun 10, 2025
Merged
Fix cost calculation failures: Azure Graph query syntax and data parsing issues#186JordanHoey96 merged 4 commits intomasterfrom
JordanHoey96 merged 4 commits intomasterfrom
Conversation
…sing Co-authored-by: thomast1906 <12154020+thomast1906@users.noreply.github.com>
Co-authored-by: thomast1906 <12154020+thomast1906@users.noreply.github.com>
|
@copilot I dont want to use any example data if API is not available, only API data |
Copilot
AI
changed the title
[WIP] Cost calculation troubleshooting
Fix cost calculation failures: Azure Graph query syntax and data parsing issues
Jun 10, 2025
Co-authored-by: thomast1906 <12154020+thomast1906@users.noreply.github.com>
Author
Removed the fallback pricing mechanism completely. The cost calculator now only uses Azure Pricing API data - when the API is unavailable, it returns 0 and sets ERROR_IN_COSTS flag instead of using example data. Commit e1b87de |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes critical cost calculation failures introduced in PR #183 that were causing Azure Graph query parser errors and invalid data line format issues.
Issues Fixed
1. Azure Pricing API URL Syntax Error
The API URL was missing a closing quote, causing KQL parser failures:
2. Azure Graph Query Field Selection Syntax
Invalid KQL syntax using
['tags']and['id']was causing parser failures:3. Resource Data Format Issues
Legacy code was adding leading commas to OS type fields, creating malformed CSV data with extra empty fields:
4. Enhanced Error Handling
Added graceful handling for existing malformed data lines:
Error Examples Fixed
Before: Cost calculation failed with errors like:
After: All data processes successfully with proper cost calculations.
Testing
Impact
Fixes #185.