Skip to content

refactor(aws): share resolveTag helper across service clients (closes #1390) - #1391

Merged
cristim merged 1 commit into
mainfrom
refactor/shared-resolvetag
Jul 16, 2026
Merged

refactor(aws): share resolveTag helper across service clients (closes #1390)#1391
cristim merged 1 commit into
mainfrom
refactor/shared-resolvetag

Conversation

@cristim

@cristim cristim commented Jul 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Removes the 4-way duplication of resolveTag that refactor(aws): reduce 4 offering-match funcs below gocyclo 10 (closes #1388) #1389 introduced across elasticache, memorydb, opensearch, and redshift service clients
  • Moves a single authoritative copy into purchasecfg.ResolveTag (the one shared internal package all four already import), so no new import was needed
  • Updates the one call site per file to purchasecfg.ResolveTag(execID)

No behavior change; all 218 existing tests pass unchanged.

Test plan

  • git grep -n "func resolveTag" shows only the shared copy in purchasecfg
  • go build ./... (providers/aws module) -- exit 0
  • go vet ./... -- exit 0
  • go test ./services/redshift/... ./services/opensearch/... ./services/memorydb/... ./services/elasticache/... ./internal/purchasecfg/... -- 218 passed, exit 0
  • gocyclo -over 10 services/ -- exit 0
  • root go build ./... -- exit 0
  • pre-commit hooks (gofmt, go vet, cyclomatic complexity) all passed

@cristim cristim added triaged Item has been triaged priority/p3 Polish / idea / may never ship severity/low Minor harm urgency/this-quarter Within the quarter impact/internal Team-internal only effort/xs Trivial / one-liner type/chore Maintenance / non-user-visible labels Jul 16, 2026
@cristim

cristim commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 16, 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: 5 minutes

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: c45a5cec-5f88-4f28-9a90-9dccf73e9f87

📥 Commits

Reviewing files that changed from the base of the PR and between caafb6e and bfd11c9.

📒 Files selected for processing (5)
  • providers/aws/internal/purchasecfg/config.go
  • providers/aws/services/elasticache/client.go
  • providers/aws/services/memorydb/client.go
  • providers/aws/services/opensearch/client.go
  • providers/aws/services/redshift/client.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/shared-resolvetag

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

@coderabbitai

coderabbitai Bot commented Jul 16, 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.

…1390)

Move the 4-way duplicate resolveTag into purchasecfg.ResolveTag -- all four
service packages (elasticache, memorydb, opensearch, redshift) already import
purchasecfg so no new import is required. No behavior change; existing tests
unchanged and green.
@cristim
cristim force-pushed the refactor/shared-resolvetag branch from 6fc7195 to bfd11c9 Compare July 16, 2026 18:55
@cristim

cristim commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 16, 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 merged commit 0401fc5 into main Jul 16, 2026
18 checks passed
@cristim
cristim deleted the refactor/shared-resolvetag branch July 16, 2026 19:05
@cristim

cristim commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

Merged to main (closes #1390): the 4 identical resolveTag copies #1389 added (one per service package) are consolidated into a single purchasecfg.ResolveTag - all 4 services already imported purchasecfg, so zero new imports. Behavior identical, tests unchanged. Owner-flagged during the merge-driver; the broader term-parser duplication the follow-up audit found is tracked in #1392.

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/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/this-quarter Within the quarter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant