Skip to content

fix(aws/recommendations): map the Europe (...) region display names - #618

Merged
cristim merged 1 commit into
mainfrom
fix/53-europe-regions
Oct 25, 2026
Merged

cristim merged 1 commit into
mainfrom
fix/53-europe-regions

Conversation

@cristim

@cristim cristim commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

refs #53

What

normalizeRegionName knew only the retired EU (...) spellings for Ireland, Frankfurt, London, Paris and Stockholm. Recommendations using the current Europe (...) display names kept the display string as their region and never matched region-code keyed coverage. This adds the five aliases.

Proof

  • New table cases in TestNormalizeRegionName fail on origin/main (5 failures) and pass with the fix.
  • Mutation (Paris mapped to the wrong code): the Paris case fails.
  • go test -race -count=1 ./... in providers/aws with GOWORK=off and with the workspace; golangci-lint v2.10.1 clean.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • AWS cost recommendations now correctly recognize Ireland, Frankfurt, London, Paris, and Stockholm regions, improving regional coverage matching.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 29b0809 and c1f8286.

Files selected for processing: 3
  • CHANGELOG.md
  • providers/aws/recommendations/converters.go
  • providers/aws/recommendations/converters_test.go

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour.

Walkthrough

normalizeRegionName now maps five European Cost Explorer display names to AWS region codes. Tests cover each mapping, and the changelog documents the change.

Changes: AWS region normalization

Layer / File(s) Summary
Region mappings and validation
providers/aws/recommendations/converters.go, providers/aws/recommendations/converters_test.go, CHANGELOG.md
The converter maps the Ireland, Frankfurt, London, Paris, and Stockholm display names to AWS region codes. Tests cover these mappings. The changelog records the change.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested labels: type/bug

Merge Risk: Minimal · up to c1f82

The aliases should let Cost Explorer recommendations match region-code-keyed coverage, with no actionable merge risk remaining.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: adding aliases that map the current "Europe (...)" display names to AWS region codes in the AWS recommendations region normalization. The changeset adds five such mapp…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: adding aliases that map the current "Europe (...)" display names to AWS region codes in the AWS recommendations region normalization. The changeset adds five such mappings in normalizeRegionName (Ireland, Frankfurt, London, Paris, Stockholm), with matching tests. The title is specific, concise, and uses the conventional prefix format. It does not list every region, but that detail is not required.

Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 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.

normalizeRegionName only knew the retired EU (...) spellings for Ireland,
Frankfurt, London, Paris and Stockholm, so a recommendation using the
current Europe (...) name kept the display string as its region and never
matched region-code keyed coverage. Add the five aliases.

refs #53

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cristim
cristim force-pushed the fix/53-europe-regions branch from 0920d8c to c1f8286 Compare October 25, 2026 16:47
@cristim
cristim merged commit 2e0513d into main Oct 25, 2026
15 checks passed
@cristim
cristim deleted the fix/53-europe-regions branch October 25, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant