Skip to content

chore(common): rename ServiceSavingsPlans -> ServiceSavingsPlansAll (closes #786) - #787

Merged
cristim merged 1 commit into
mainfrom
chore/sp-slug-clarity
Jul 19, 2026
Merged

cristim merged 1 commit into
mainfrom
chore/sp-slug-clarity

Conversation

@cristim

@cristim cristim commented May 28, 2026

Copy link
Copy Markdown
Member

Summary

ServiceSavingsPlans was an umbrella sentinel whose name looked identical to the
four per-plan-type slugs (ServiceSavingsPlansCompute, etc.), making it unclear
at call sites whether a variable held the umbrella or a specific plan type.

Changes

  1. pkg/common/types.go -- rename constant ServiceSavingsPlans to
    ServiceSavingsPlansAll; string value "savingsplans" is unchanged (DB column
    locked by issue Normalize 'savings-plans' vs 'savingsplans' identifier across frontend + backend cloud-commitments-platform#7). Updated docstring makes the sentinel/umbrella intent
    explicit and references SavingsPlansPlanTypes().

  2. pkg/common/types.go -- add SavingsPlansPlanTypes() []ServiceType
    returning the 4 per-plan-type slugs in canonical order
    (Compute -> EC2Instance -> SageMaker -> Database). Unit test in
    pkg/common/types_test.go asserts length 4, canonical order, and that every
    returned slug passes IsSavingsPlan.

  3. pkg/common/types.go -- update IsSavingsPlan switch arm to
    ServiceSavingsPlansAll; no behaviour change. Updated 23 other call-site files
    (providers, cmd, internal/purchase) with the same mechanical swap.

Verification

  • go build ./... clean
  • go test .../pkg/common/... .../providers/aws/recommendations/... .../internal/api/... -count=1 -short: 1802 tests pass
  • git grep -E '\bServiceSavingsPlans\b' -- '*.go': 0 hits (no stale bare references)
  • git grep ServiceSavingsPlansAll -- '*.go': 82 occurrences (matches the pre-rename count of the bare identifier)

Notes

PR #785 (closes #784, currently open and mid-CR) references ServiceSavingsPlans in
its diff. It will need a trivial rebase after this merges -- a mechanical
ServiceSavingsPlans -> ServiceSavingsPlansAll identifier swap on its branch, no
logic change. No other in-flight branch references the bare identifier.

Closes #786
Refs LeanerCloud/cloud-commitments-platform#7 #785

@cristim cristim added triaged Item has been triaged priority/p3 Polish / idea / may never ship severity/low Minor harm urgency/eventually No deadline impact/internal Team-internal only effort/s Hours type/chore Maintenance / non-user-visible labels May 28, 2026
@coderabbitai

coderabbitai Bot commented May 28, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 36 seconds

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 28614877-552e-49d1-b673-2faa8e83e482

📥 Commits

Reviewing files that changed from the base of the PR and between 5c267c5 and 917af1e.

📒 Files selected for processing (27)
  • cmd/helpers_test.go
  • cmd/main_test.go
  • cmd/multi_service_helpers.go
  • cmd/multi_service_stats.go
  • cmd/multi_service_stats_test.go
  • cmd/multi_service_test.go
  • internal/purchase/coverage_extra_test.go
  • internal/purchase/execution.go
  • pkg/common/service_details_codec.go
  • pkg/common/service_details_codec_test.go
  • pkg/common/types.go
  • pkg/common/types_test.go
  • providers/aws/provider.go
  • providers/aws/provider_test.go
  • providers/aws/recommendations/client.go
  • providers/aws/recommendations/client_test.go
  • providers/aws/recommendations/family_nu_test.go
  • providers/aws/recommendations/parser_sp.go
  • providers/aws/recommendations/parser_sp_additional_test.go
  • providers/aws/services/savingsplans/client.go
  • providers/aws/services/savingsplans/client_test.go
  • providers/azure/provider.go
  • providers/azure/provider_test.go
  • providers/azure/recommendations.go
  • providers/azure/recommendations_test.go
  • providers/azure/services/savingsplans/client.go
  • providers/azure/services/savingsplans/client_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/sp-slug-clarity

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

@cristim

cristim commented May 28, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

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.

@cristim

cristim commented May 30, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

Rate Limit Exceeded

@cristim have exceeded the limit for the number of chat messages per hour. Please wait 54 minutes and 14 seconds before sending another message.

@cristim

cristim commented Jun 1, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

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.

@cristim

cristim commented Jun 4, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

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.

@cristim

cristim commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@cristim
cristim changed the base branch from feat/multicloud-web-frontend to main June 9, 2026 15:46
@cristim
cristim force-pushed the chore/sp-slug-clarity branch from e326233 to 7ffd4c0 Compare June 19, 2026 15:46
@cristim

cristim commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 19, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

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.

@cristim

cristim commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

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.

@cristim

cristim commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

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.

…loses #786

Rename the umbrella sentinel ServiceSavingsPlans to ServiceSavingsPlansAll
for clarity (distinguishing it from the per-plan-type slugs). Updates all
callers across cmd/, internal/purchase/, pkg/common/, providers/aws/, and
providers/azure/.

Resolves conflict in service_details_codec.go by using ServiceSavingsPlansAll
and combining comments from both sides.
@cristim
cristim force-pushed the chore/sp-slug-clarity branch from 077312a to 917af1e Compare July 19, 2026 18:58
@cristim
cristim merged commit 3a5ffc8 into main Jul 19, 2026
19 checks passed
@cristim

cristim commented Jul 19, 2026

Copy link
Copy Markdown
Member Author

Rebased onto origin/main, all CI checks passed, squash-merged.

@cristim
cristim deleted the chore/sp-slug-clarity branch July 27, 2026 11:09
cristim added a commit that referenced this pull request Sep 27, 2026
…loses #786 (#787)

Rename the umbrella sentinel ServiceSavingsPlans to ServiceSavingsPlansAll
for clarity (distinguishing it from the per-plan-type slugs). Updates all
callers across cmd/, internal/purchase/, pkg/common/, providers/aws/, and
providers/azure/.

Resolves conflict in service_details_codec.go by using ServiceSavingsPlansAll
and combining comments from both sides.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/s Hours impact/internal Team-internal only priority/p3 Polish / idea / may never ship severity/low Minor harm triaged Item has been triaged type/chore Maintenance / non-user-visible urgency/eventually No deadline

Projects

None yet

1 participant