You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 268ce50
Browse filesBrowse the repository at this point in the historyBrowse files
fix(gcp): derive RecurringMonthlyCost from CommitmentCost without redundant lookups
Address CodeRabbit findings on PR #811:
- cloudsql/cloudstorage/memorystore converters issued a second
getSQLPricing/getStoragePricing/getRedisPricing call after fill*Pricing
already performed the lookup, doubling SKU API calls and emitting warnings
even for empty ResourceType. Reuse the CommitmentCost the fill* helpers
populate and gate the whole block on a non-empty ResourceType.
- computeengine unconditionally set RecurringMonthlyCost to a pointer-to-zero,
mislabeling monthly-billed CUDs as a known-zero recurring fee and breaking
the nil-vs-zero contract. Derive the monthly charge from CommitmentCost and
leave the field nil when pricing is unavailable. Add termYearsFromTerm and
reuse it in enrichRecWithPricing, which also makes 36mo terms map to 3 years.
- Fix the success-path test fixtures: getSQLPricing/getRedisPricing now require
a commitment SKU, so the on-demand-only fixtures drove the failure branch and
left RecurringMonthlyCost nil. Add commitment SKUs and replace the stale
hardcoded discount multipliers with the commitment-rate-derived expectation.
- Fix compile errors in cloudstorage and memorystore tests that still called
convertGCPRecommendation with two arguments; pass common.RecommendationParams.
- Align the compute test assertion with the monthly-default path: empty params
yield no computed monthly pricing, so RecurringMonthlyCost stays nil (unknown),
not an explicit zero.
0 commit comments