feat(azure/savings-plans): wire SP rec collection into scheduler (closes #593) - #809
Conversation
Add savingsplans goroutine to the GetRecommendations fan-out in providers/azure/recommendations.go, mirroring the AWS SP wiring in providers/aws/recommendations/client.go GetAllRecommendations. The SP client's GetRecommendations intentionally returns an empty slice (Azure Benefits Recommendations API is still in preview), so no scheduler change is needed -- the goroutine slot is reserved and will start surfacing data once the upstream API stabilises. Also add TestGetRecommendations_SavingsPlansServiceIncluded to pin that shouldIncludeService passes ServiceSavingsPlans through on both empty-params (all-services) and explicit-service sweeps.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
Looking for one thing? Review this PR in Change Stack to search files, summaries, diffs, and code without losing your place. Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR extends Azure ChangesSavings Plans service integration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
@coderabbitai review |
Rate Limit Exceeded
|
|
Verification note: |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
savingsplansgoroutine to theGetRecommendationsfan-out inproviders/azure/recommendations.go, mirroring the AWS SP slot inproviders/aws/recommendations/client.goGetAllRecommendationsGetRecommendationsintentionally returns an empty slice (Azure Benefits Recommendations API is still in preview); the goroutine slot is reserved so the scheduler picks up data the moment the upstream API stabilises, without needing a second wire-up PRTestGetRecommendations_SavingsPlansServiceIncludedto pin thatshouldIncludeServiceletsServiceSavingsPlansthrough on both empty-params (all-services) and explicit-service sweepsTest plan
go build ./...passesgo test github.com/LeanerCloud/CUDly/providers/azure/...passes (664 tests)TestGetRecommendations_SavingsPlansServiceIncludedcovers empty-params, explicit-SP, and cross-service casesSummary by CodeRabbit
Release Notes