Repository navigation
fix(aws/recommendations): map Taipei, New Zealand and the remaining partition region names - #622
Conversation
…artition region names Add Cost Explorer display names for ap-east-2 (Taipei) and ap-southeast-6 (New Zealand), plus the China, GovCloud, ISO and European Sovereign Cloud descriptions found in aws-sdk-go-v2 internal/endpoints/awsrulesfn/partitions.json. Hoist the alias table to a package-level regionAliases map, drop the prefix branch that returned its input unchanged (same fallthrough result for every input), and make the collision test table-driven over the full map. Refs #53 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Alias map and validation providers/aws/recommendations/converters.go, providers/aws/recommendations/converters_test.go, CHANGELOG.md |
normalizeRegionName uses a package-level map with additional China, sovereign-cloud, ISO, GovCloud, Taipei, and New Zealand aliases. The tests check every map entry and expected mappings for selected aliases. The changelog records these changes and the removal of the region-code prefix checks. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- LeanerCloud/cloud-commitments-go#621: Adds region display-name mappings that this change carries forward and includes in its expanded collision test.
- LeanerCloud/cloud-commitments-go#618: Adds Europe display-name mappings that this change retains and accounts for in its duplicate-code test.
Merge Risk: 
Minimal · up to 6de52
-
The region-name mappings are ready to merge after normal checks.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. (1 skipped: 1 unsupported.)
-
Finishing Touches
-
📝 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.
Adds the missing Cost Explorer region display names and tightens the alias tests.
Asia Pacific (Taipei)(ap-east-2) andAsia Pacific (New Zealand)(ap-southeast-6), plus the China, GovCloud, ISO and European Sovereign Cloud descriptions, all taken from aws-sdk-go-v2internal/endpoints/awsrulesfn/partitions.json(v1.41.5).normalizeRegionName; it returned its input, the same as the fallthrough. An equivalence test over every alias and several non-alias inputs (old vs new) matched.regionAliasesmap.go test -race -count=1 ./...passes in providers/aws with GOWORK=off and with the workspace; golangci-lint v2.10.1 reports 0 issues.refs #53
🤖 Generated with Claude Code
Summary by CodeRabbit