Repository navigation
fix(aws/recommendations): map the remaining new-region display names - #621
Conversation
normalizeRegionName now maps the Cost Explorer display names for ap-southeast-5 (Asia Pacific (Malaysia)), ap-southeast-7 (Asia Pacific (Thailand)), ca-west-1 (Canada West (Calgary)) and mx-central-1 (Mexico (Central)), as listed in #53. Each name is taken from aws-sdk-go-v2@v1.41.5 internal/endpoints/awsrulesfn/partitions.json lines 51, 57, 66 and 102. Refs #53 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reached
This review includes 3 billable files and costs up to $0.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 36 minutes for your next included review. View limit details
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Add and verify region mappings providers/aws/recommendations/converters.go, providers/aws/recommendations/converters_test.go, CHANGELOG.md |
The normalizer adds four region-name mappings. Tests check the expected codes and verify that the tested names map to distinct codes. The changelog records the additions. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- LeanerCloud/cloud-commitments-go#618: Adds Europe aliases to the same AWS Cost Explorer region-name normalizer.
Suggested labels: priority/p2, severity/medium, triaged, urgency/this-quarter, impact/few, effort/s, type/bug
Merge Risk: 
Minimal · up to 85897
-
The region normalization update is ready to merge with no identified production risk.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Refs #53.
Adds the non-Europe Cost Explorer display names that #53 lists and
normalizeRegionNamedid not map:Asia Pacific (Malaysia)toap-southeast-5,Asia Pacific (Thailand)toap-southeast-7,Canada West (Calgary)toca-west-1,Mexico (Central)tomx-central-1. Each is verified againstaws-sdk-go-v2@v1.41.5/internal/endpoints/awsrulesfn/partitions.jsonlines 51, 57, 66 and 102.The trailing
HasPrefixbranch is left in place: it is reachable (any region-code input such asus-east-1takes it) but returns the input unchanged, so it is redundant rather than unreachable and removing it does not change behaviour.Tests: four table cases fail without the fix, plus a collision test asserting distinct names map to distinct codes.
go test -race -count=1 ./...passes inproviders/awswithGOWORK=offand with the workspace; golangci-lint v2.10.1 reports 0 issues.🤖 Generated with Claude Code
Summary by CodeRabbit