Skip to content

fix(gcp/memorystore): list Redis SKUs from the Cloud Memorystore for Redis billing service - #483

Merged
cristim merged 1 commit into
mainfrom
fix/380-memorystore-service-id
Oct 16, 2026
Merged

cristim merged 1 commit into
mainfrom
fix/380-memorystore-service-id

Conversation

@cristim

@cristim cristim commented Oct 16, 2026

Copy link
Copy Markdown
Member

Summary

listSKUs in providers/gcp/services/memorystore/client.go listed SKUs of services/D559-82DA-3A56, which the issue reports returns 404 live, so every Memorystore pricing lookup failed and was only logged. It now uses services/5AF5-2C11-D467 (Cloud Memorystore for Redis) through a named const, following computeServiceID in computeengine. listSKUs is the only ListSKUs call in the package; no other code references the old ID.

Closes #380

Tests

TestListSKUs_UsesMemorystoreForRedisServiceID (new service_id_test.go) uses a spy BillingService and asserts the service name passed to ListSKUs.

  • Fail-before (scratch copy with the old ID): expected services/5AF5-2C11-D467, actual services/D559-82DA-3A56. Passes after.

Verification

make build, make vet, (cd providers/gcp && GOWORK=off go test -race -short ./...), pinned golangci-lint v2.10.1 (0 issues), gofmt and the commit/pre-push hooks pass.
Evidence is fixture-based. No live Cloud Billing call was made, so the correctness of 5AF5-2C11-D467 rests on the live observation recorded in the issue; nothing else in the repo corroborates it.

Local review: one adversarial non-author pass, no actionable findings (mutation probe reverting the const fails the test; hunk does not overlap #433 or #471).

🤖 Generated with Claude Code

@cristim cristim added priority/p2 Backlog-worthy severity/medium Moderate harm urgency/this-quarter Within the quarter impact/few Limited audience effort/xs Trivial / one-liner type/bug Defect triaged Item has been triaged labels Oct 16, 2026
@cristim

cristim commented Oct 16, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 2 billable files and costs up to $0.50.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 46 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 70 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: LeanerCloud/cloud-commitments-go/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: f0f2755d-cc90-4943-a627-611eb4c59e8a
📥 Commits

Reviewing files that changed from the base of the PR and between 6ee93e7 and c31c81f.

📒 Files selected for processing: 2
  • providers/gcp/services/memorystore/client.go
  • providers/gcp/services/memorystore/service_id_test.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

…Redis billing service

The hardcoded billing service ID returned 404 from the live Cloud Billing
API, so Memorystore pricing could never load. Use services/5AF5-2C11-D467
via a named const and assert the ID passed to ListSKUs.

Closes #380

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cristim
cristim force-pushed the fix/380-memorystore-service-id branch from 6b40833 to c31c81f Compare October 16, 2026 23:14
@cristim

cristim commented Oct 16, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: CLEAN at 6b408335963d8503a806b141fb94ef08d9f7dc07, carried to c31c81f85d69193e58175fbdcf06502acb329d9b

Reviewer: an independent agent that did not write this change (Sonnet, high effort), cold brief, full diff. The PR body was treated as a claim.

Blocking findings: none.

Service ID corroboration. Google's public SKU listing at https://cloud.google.com/skus/sku-groups/cloud-memorystore-for-redis labels each row "Cloud Memorystore for Redis (5AF5-2C11-D467)". That matches the live observation recorded in #380. The old D559-82DA-3A56 has no public reference; #380's live 404 is the only evidence on it.

What was attacked:

  • git grep for both IDs found only client.go:548 (the new const), client.go:558 (the single listSKUs call) and the test. No other service, ci_cd_sanity_tests or doc references either ID.
  • Downstream matching (client.go:451) uses skumatch.HasToken on the tier, plus InRegion and Slot, with no hardcoded Redis or Valkey description strings.
  • The spy is passed straight into the production client.listSKUs. skuCache starts nil, so the call is not skipped.

Non-blocking: it is unconfirmed that the real catalog's descriptions carry the tier token the matcher expects. That is outside #380, which is about the 404.

Local verification (macOS, Go 1.27.2)

Fixture and spy evidence; no live Cloud Billing call:

  • Rebase. Onto main 6ee93e7 (ruleset requires up-to-date branches). git range-diff shows 1: 6b40833 = 1: c31c81f, identical.
  • Fail-before at c31c81f. With the const reverted to D559-82DA-3A56, TestListSKUs_UsesMemorystoreForRedisServiceID FAILS (expected services/5AF5-2C11-D467, actual services/D559-82DA-3A56).
  • Pass-after at c31c81f. (cd providers/gcp && GOWORK=off go test -race -short -count=1 ./...) exits 0 with 7 packages ok. make build and make vet pass.

Labels mirror #380. CodeRabbit hit "Review limit reached" on this PR. If that holds at merge: CR waived: quota, adversarial review + local verification + green CI.

@cristim
cristim merged commit ca5e743 into main Oct 16, 2026
15 checks passed
@cristim
cristim deleted the fix/380-memorystore-service-id branch October 16, 2026 23:21
@cristim

cristim commented Oct 16, 2026

Copy link
Copy Markdown
Member Author

Merged by squash at reviewed head c31c81f85d69193e58175fbdcf06502acb329d9b as ca5e743f. The gates were met on that SHA:

  • independent review CLEAN, posted above (carried across rebases by identical git range-diff)
  • local verification posted above
  • CI green on c31c81f8
  • labels mirrored; no unresolved threads

CR waived: quota, adversarial review + local verification + green CI. A retrospective CodeRabbit review will run when quota returns. Closes #380.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/xs Trivial / one-liner impact/few Limited audience priority/p2 Backlog-worthy severity/medium Moderate harm triaged Item has been triaged type/bug Defect urgency/this-quarter Within the quarter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(gcp/memorystore): billing catalog service ID D559-82DA-3A56 returns 404, so Memorystore SKU pricing never resolves

1 participant