Improve cost calculation for additional resource types - #183
Merged
Conversation
Co-authored-by: thomast1906 <12154020+thomast1906@users.noreply.github.com>
Co-authored-by: thomast1906 <12154020+thomast1906@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Improve cost calculation for additional resource types
Improve cost calculation for additional resource types
Jun 10, 2025
JordanHoey96
marked this pull request as ready for review
June 10, 2025 12:35
JordanHoey96
requested review from
ozzyib and
ryanmcalary11
and removed request for
a team
June 10, 2025 12:35
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 extends the cost calculation system to support additional Azure resource types beyond AKS clusters and VM Scale Sets, as requested in the issue.
Changes Made
🎯 New Resource Type Support
🔧 Enhanced Data Format
The system now supports an extended format while maintaining full backward compatibility:
New format:
Legacy format (still supported):
🚀 Enhanced Azure Integration
📊 Key Features
🧪 Testing Results
🧪 COMPREHENSIVE COST CALCULATION TEST SUITE ============================================ 🔍 VM count aggregation: ✅ PASS 🔍 AppGW count tracking: ✅ PASS 🔍 Legacy format processing: ✅ PASS 🔍 New format processing: ✅ PASS 🔍 Mixed format processing: ✅ PASS 🔍 All resource types: ✅ PASS 🔍 Stay-on-late increases cost: ✅ PASS 🔍 Error handling: ✅ PASS Tests passed: 8/8 🎉 ALL TESTS PASSED!📚 Documentation
Added comprehensive documentation in
COST_CALCULATION_IMPROVEMENTS.mdcovering:🔄 Example Usage
For a mixed environment shutdown exclusion, the system now accurately calculates costs for:
Sample real-world cost calculation:
This enhancement provides the accurate cost estimates requested while maintaining the existing 25% buffer for unmeasurable costs and preserving full compatibility with current workflows.
Fixes #182.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
prices.azure.compython3 test_azure_pricing.py(dns block)python3 scripts/cost-calculator.py(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)If you need me to access, download, or install something from one of these locations, you can either: