Repository navigation
fix(purchase): list Azure Cosmos DB's nosql slug in mapServiceSlug - #1459
Conversation
Settings writes Azure Cosmos DB service configs and overrides under "nosql", the slug Cosmos recommendations carry, but mapServiceSlug did not list it, so the settings test had to carry azure/nosql as a named exception. The Azure provider's GetServiceClient already accepts common.ServiceNoSQL, and mapServiceType already passed "nosql" through verbatim, so dispatch is unchanged; the slug table now states it. The frontend test drops the exception, and a purchase test pins every canonical reservation slug, nosql included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reached
This review includes 5 billable files and costs up to $1.25. Or wait 59 minutes for your next included review. View limit details
Comment |
|
Independent review (IAmJSD's agent, fresh context, given only the diff, the issue and the PR text): VERDICT: APPROVE Blocking:
Non-blocking:
Attacked:
Body-stale:
Reviewer: rE2. Bar while the maintainers are away (set by IAmJSD as acting owner): one approving independent review on the head, two for money, auth and security paths. |
|
Independent review (IAmJSD's agent, fresh context, given only the diff, the issue and the PR text): VERDICT: APPROVE Blocking:
Non-blocking:
Attacked: I checked that this is a runtime no-op. Body-stale:
Reviewer: rE5. Bar while the maintainers are away (set by IAmJSD as acting owner): one approving independent review on the head, two for money, auth and security paths. |
Keep both new tests in slug_alias_drift_test.go: this branch's TestMapServiceSlugAcceptsEveryCanonicalReservationSlug and main's TestSavingsPlansSpellingsMatchSuppressionAliases (LeanerCloud#1456). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent review (IAmJSD's agent, fresh context, given only the diff, the issue and the PR text): VERDICT: APPROVE Blocking:
Non-blocking:
Attacked:
Body-stale:
Reviewer: rE7. Bar while the maintainers are away (set by IAmJSD as acting owner): one approving independent review on the head, two for money, auth and security paths. |
|
Independent review (IAmJSD's agent, fresh context, given only the diff, the issue and the PR text): VERDICT: APPROVE Blocking:
Non-blocking:
Attacked:
Body-stale:
Reviewer: rE8. Bar while the maintainers are away (set by IAmJSD as acting owner): one approving independent review on the head, two for money, auth and security paths. |
|
Local verification at |
|
Merged by IAmJSD's agent at IAmJSD's request (IAmJSD is acting owner while the maintainers are away), under the bar IAmJSD set: 2 approving independent review(s) on |
Refs #613
Why
Settings writes Azure Cosmos DB service configs and per-account overrides under
nosql, the slug Cosmos recommendations carry (common.ServiceNoSQL). The backend slug table,mapServiceSlugininternal/purchase/execution.go, did not list it. Sosettings-service-ids.test.ts, which checks every Settings id against that table, had to carryazure/nosqlas a named exception.What
internal/purchase/execution.go: adds"nosql": common.ServiceNoSQLto the canonical slugs inmapServiceSlugand updates its doc comment. Runtime dispatch doesn't change.mapServiceType("nosql")already returnedcommon.ServiceNoSQLthrough its verbatim fallback, and the pinned Azure provider'sGetServiceClientalready handlescommon.ServiceNoSQL. The AWS no-token re-drive guard still doesn't cover nosql (it only matches EC2/compute/Redshift/data-warehouse), and the Azure reservation re-drive stays allowed.internal/purchase/slug_alias_drift_test.go: newTestMapServiceSlugAcceptsEveryCanonicalReservationSlug, which pins compute, relational-db, nosql, cache, search and data-warehouse.internal/purchase/coverage_extra_test.goandredrive_guard_reach_test.go: addnosqlto the lists that enumeratemapServiceSlug's keys.frontend/src/__tests__/settings-service-ids.test.ts: removes theNOT_IN_PURCHASE_SLUGS = ['azure/nosql']exception. Every Azure/GCP id the Settings cards save and the override list offers must now be a backend slug, with no exceptions.What remains on #613
account_service_overridesrows saved under the old ids (azure/vm,azure/sql,azure/cosmosdb,azure/redis,gcp/sql,gcp/memorystore) are still only flagged in the UI. They need a manual re-create or a backend SQL migration, and oldservice_configsrows under those ids are never deleted. This PR does not add that migration on purpose: the migration numbers are held by a chain of open PRs, so it should come as a separate change at 000149 or later.Verification
execution.go,TestMapServiceSlugAcceptsEveryCanonicalReservationSlugfails withmapServiceSlug rejects canonical slug "nosql".execution.goand the exception removed,settings-service-ids.test.tsfails, receiving["azure/nosql"]where it expects[]. Both pass after.go build ./... && go vet ./... && go vet -tags integration ./... && (cd tests/e2e && go vet -tags e2e ./...): pass.golangci-lintv2.10.1 on./internal/purchase/..., with and without--build-tags integration: 0 issues.gocyclo -over 10 internal/purchase/execution.go: nothing reported.go test -race -short -count=1 ./internal/purchase/: ok.go test -race -tags integration -count=1 ./internal/purchase/: 10 tests failed on the first full run when the shared Postgres container was lost on a heavily loaded host. All 10 passed on rerun (TestApproveAzurePricingRequiresMigrationAndRecollection,TestCancelExecution_ScheduledRowIsRefusedWithRevokeHint,TestFourEyes_Sweep*,TestReconcileLadderTranches_*,TestManualPlanStep_*).frontend/, afternpm ci):npm run -s lint && npm run -s typecheck && npm run -s build && npx jest --no-coverage --silentall pass (171 suites, 4501 tests passed, 1 skipped).scripts/test-git-secrets-allowlist.sh: 183 PASS, 0 FAIL.🤖 Generated with Claude Code