Reviewed commit: be11bdcb5 (origin/main), from the 2026-07-28 full-repo review.
Severity: HIGH. GCP CUD recommendations may be permanently zero, indistinguishable from "no savings available".
Where
providers/gcp/services/computeengine/client.go:255
What
The parent is built as:
projects/{p}/locations/{region}/recommenders/google.billing.CostInsight.commitmentRecommender
Google's published commitment recommenders are google.compute.commitment.UsageCommitmentRecommender (regional) and google.cloudbilling.commitment.SpendBasedCommitmentRecommender (global). This ID matches neither.
The sibling GCP clients all use plausible documented IDs (google.cloudsql.instance.PerformanceRecommender, google.storage.bucket.CostRecommender, google.memorystore.redis.PerformanceRecommender); this one has no counterpart. Every test that exercises it injects a mock (client_test.go:972 echoes the same literal), so no test would catch a wrong ID.
Failure scenario
ListRecommendations returns NOT_FOUND / INVALID_ARGUMENT for the unknown recommender. GetRecommendations propagates it (:277), collectRegion counts every region's compute call as failed, and since compute is one of four attempted services, the partial-failure path returns the other three services' results with a nil error.
GCP CUD recommendations are then permanently zero with only a WARN log, indistinguishable from "no CUD savings available".
Fix direction
Verify against the live Recommender API and switch to google.compute.commitment.UsageCommitmentRecommender. Add a startup or integration check that a known-good project returns a non-error response.
Related
Same shape as the Azure literals tracked by LeanerCloud/cloud-commitments-cli#1508 / LeanerCloud/cloud-commitments-cli#1318 and needs the same live-catalog verification. providers/gcp is not covered by CI (LeanerCloud/cloud-commitments-cli#1478).
Reviewed commit:
be11bdcb5(origin/main), from the 2026-07-28 full-repo review.Severity: HIGH. GCP CUD recommendations may be permanently zero, indistinguishable from "no savings available".
Where
providers/gcp/services/computeengine/client.go:255What
The parent is built as:
Google's published commitment recommenders are
google.compute.commitment.UsageCommitmentRecommender(regional) andgoogle.cloudbilling.commitment.SpendBasedCommitmentRecommender(global). This ID matches neither.The sibling GCP clients all use plausible documented IDs (
google.cloudsql.instance.PerformanceRecommender,google.storage.bucket.CostRecommender,google.memorystore.redis.PerformanceRecommender); this one has no counterpart. Every test that exercises it injects a mock (client_test.go:972echoes the same literal), so no test would catch a wrong ID.Failure scenario
ListRecommendationsreturnsNOT_FOUND/INVALID_ARGUMENTfor the unknown recommender.GetRecommendationspropagates it (:277),collectRegioncounts every region's compute call as failed, and since compute is one of four attempted services, the partial-failure path returns the other three services' results with a nil error.GCP CUD recommendations are then permanently zero with only a WARN log, indistinguishable from "no CUD savings available".
Fix direction
Verify against the live Recommender API and switch to
google.compute.commitment.UsageCommitmentRecommender. Add a startup or integration check that a known-good project returns a non-error response.Related
Same shape as the Azure literals tracked by LeanerCloud/cloud-commitments-cli#1508 / LeanerCloud/cloud-commitments-cli#1318 and needs the same live-catalog verification.
providers/gcpis not covered by CI (LeanerCloud/cloud-commitments-cli#1478).