fix(gcp): query the resource-based commitment recommender - #162
Merged
Merged
Conversation
Use the catalogued project-scoped UsageCommitmentRecommender ID. Exercise regional discovery and recommendation pagination through the real SDK with local fixture services, including failure aggregation.
Contributor
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 22 minutes for your next included review. View limit detailsLimit details: You’ve used the included review currently available. Your 68 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Review configuration: ⚙️ Run configurationConfiguration used: Repository: LeanerCloud/cloud-commitments-go/.coderabbit.yaml Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (2)
Comment |
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.
Compute Engine recommendation requests currently select a nonexistent recommender. Use Google's documented
google.compute.commitment.UsageCommitmentRecommenderunder the existing project and region parent so resource-based CUD recommendations can be returned.The regression calls the public provider adapter through the real Google SDK against local HTTP and gRPC fixture services. It checks both regional parent paths, routing metadata, pagination, ACTIVE filtering, returned savings, empty results, all-region errors, and partial success. Existing failure aggregation remains unchanged.
Validation: the regression failed on the original ID with the wrong full parent and
NotFound, then passed with the fix. GCP module race tests, build, vet, pinned golangci-lint 2.10.1 and normal commit hooks pass. Independent GPT-6 Astra review completed two implementation passes and reproduced the regression by reversing the ID.Independent final verdict: APPROVED
6104f675db263c818760e3347cf2bb9ab3207a04, no actionable findings. This additive merge includes maine879f6ae5db035beefe6711de8120fe80ff0cfe0; the GCP diff is unchanged. Focused GCP, AWS daily coverage, and Azure pager regression race tests passed on the combined tree, along with GCP build, vet and pinned lint. The reviewer checked both merge parents and the full committed PR diff, then reranGOWORK=off GOTOOLCHAIN=go1.26.6 go test -race -count=1 -run TestComputeRecommendationsThroughSDK .fromproviders/gcp; it passed on macOS at the final SHA.Evidence uses actual SDK clients with local fixture responses, not a live Google backend. No cloud credentials or mutations were used; purchase conversion and pricing are not changed.
References: Google recommender catalog, project-scoped list API.
Closes #134