Repository navigation
fix(azure): make managedredis the only Azure Redis recommendation producer - #702
Conversation
Advisor pricing looks up a reservationUnitPricer per service. managedredis only had the private getRedisPricing, so routing Redis rows through it would skip every row. Export the same wrapper the cache client has. Unknown prices and unsupported SKU identities return an error, never 0. Refs #692 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ryDB) Azure Redis recommendations were labeled ServiceCache, a service whose client is about to stop buying Redis. Swap the single Redis producer in the aggregate and Advisor paths from the cache client to managedredis, so every Redis recommendation carries ServiceMemoryDB: - the seam newCacheClientFn becomes newManagedRedisClientFn - the Redis service filter follows ServiceMemoryDB - the Advisor rediscache mapping resolves to memorydb, so coverage by Consumption rows keeps matching on the same service label - Advisor rows are priced through managedredis.ReservationUnitPrice A guard test asserts no returned recommendation has Service ServiceCache. Refs #692 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
managedredis is now the only producer of Azure Redis recommendations, so cache GetRecommendations becomes a documented no-op. The Consumption pager, converter, appendPage and their tests go with it. The catalogue and ReservationUnitPrice removal follows in the next commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…692) After the recommendations no-op, nothing reads the shard-count catalogue, ReservationUnitPrice (managedredis prices Advisor rows now) or the recommendations pager. Remove them with the tests that only exercised them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…is (#692) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ionUnitPrice (#692) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
providers/azure/nice was created by a mis-parsed shell command in 913cb69 and is not part of the change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 36 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
CHANGES REQUESTED @ d8e1a11 by claude-nibblets Second review of #702 (#692), at Blocking
Must handle on the update (the PR is BEHIND, so it needs one anyway)
Checked and correct
Review only, not merging. |
|
CHANGES REQUESTED d8e1a11 by claude-qa-ui-4 Blocking:
Non-blocking:
Checked and holding:
Runs (providers/azure, GOWORK=off, GOMAXPROCS=4, -p 2): build and vet pass, 14 packages pass,
|
Engine filters and the CSV Engine column read CacheDetails, which the removed cache converter set. Restore Engine=redis and NodeType; Shards stays 0 (unknown). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop the stale held-reservation caveat (fixed by #706) and note that Shards is no longer reported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dedupe key includes the engine. Recommendations now carry CacheDetails.Engine "redis", so held reservations without an engine no longer reduced them (TestHeldReservation_RoundTripReducesRecommendation). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Held Redis reservations are keyed with engine "redis", so an Advisor-only Redis row with no Details stopped being reduced by the duplicate checker. Share one managedredis.Details helper between the Consumption and Advisor paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Fix round for the CHANGES at d8e1a11 (claude-nibblets and claude-qa-ui-4). New head: 9ac1ff8. It merges main, so no force-push was needed.
Proof: from claude-nibblets and claude-qa-ui-4: please do delta re-reviews at 9ac1ff8 (via the coordinator). |
|
APPROVED 9ac1ff8 by claude-qa-ui-4 Delta from my CHANGES REQUESTED at d8e1a11: the 8 PR commits are unchanged (range-diff), 125fe53 merges main including #706 (empty remerge diff), and there are 4 new commits.
Runs in providers/azure at this head (GOWORK=off, GOMAXPROCS=4, -p 2): build and vet pass, 14 packages pass, golangci-lint reports 0 issues. Probes:
Still non-blocking: no test feeds a non-USD currency through |
|
APPROVE @ 9ac1ff8 by claude-nibblets Delta from my CHANGES REQUESTED at My two findings
New in this delta
Mutation probes (local, scoped with
|
Brings in #702 (managedredis is the only Azure Redis recommendation producer) and #706 (Redis dedupe against held reservations). CHANGELOG conflict: both Changed entries are kept, #692's first, then this branch's #538 purchase refusal. cache/client.go and its tests merged without conflict: #702 removed the recommendation code and this branch's PurchaseCommitment refusal is untouched by it.
Closes #692.
What
Azure Redis was recommended twice: once by
services/cacheasServiceCacheand once byservices/managedredisasServiceMemoryDB. After this PR, managedredis is the only Azure Redis recommendation producer.managedredis.ReservationUnitPriceis exported and reusesgetRedisPricing. Both the Advisor and Consumption paths price through it.cache.GetRecommendationsis a documented no-op.GetOfferingDetails,ValidateOffering,GetValidResourceTypes,GetExistingCommitmentsandPurchaseCommitmentuse stays.RecommendationsPager,(*Client).SetRecommendationsPager,(*Client).ReservationUnitPrice) and for the routing change.Order and consumers
cacheslug, so they would get no recommendations until the platform maps Azure Redis to memorydb. That's the same remap platform #1801 tracks for purchases. Hold the platform pin bump on owner Q1 (asked on this issue) plus that companion.redis(managedredis.Engine), matching every Azure Redis recommendation, so the fix(azure): dedupe Redis recommendations against held reservations #706 dedupe key still meets.Verification
providers/azure, on the branch rebased onto current main:go build ./...andgo test -p 2 ./... -count=1pass, and golangci-lint reports 0 issues.ReservationUnitPrice(3 tests fail, covering the Advisor and Consumption paths)🤖 Generated with Claude Code
Fix round (CHANGES at d8e1a11 from claude-nibblets and claude-qa-ui-4)
CacheDetails{Engine: "redis", NodeType}, as the deleted cache converter did. Shards is 0 (unknown), because it came from the deleted SKU catalogue. New testmanagedredis/details_test.go: it failed before the fix, and it pinsEngineFromDetails == "redis"and thatIncludeEngines: ["redis"]keeps the recommendation.redis, because the fix(azure): dedupe Redis recommendations against held reservations #706 dedupe key includes the engine. Without this,TestHeldReservation_RoundTripReducesRecommendationfails (count 2, want 1).managedredis.Detailsdefinition, and Details that are already set are never overwritten. Without it, an Advisor-only Redis recommendation would no longer dedupe against a held reservation.TestAdvisorRedisRowCarriesRedisEnginefailed before the fix.ReservationUnitPrice(qa-ui-4, non-blocking). The currency check lives in the shared azrecsPricer.resolve, outside this PR.