Skip to content

Accept AWS regions by name shape instead of a fixed list - #94

Merged
quinnj merged 1 commit into
mainfrom
claude/region-shape
Oct 22, 2026
Merged

quinnj merged 1 commit into
mainfrom
claude/region-shape

Conversation

@quinnj

@quinnj quinnj commented Oct 22, 2026

Copy link
Copy Markdown
Member

URL parsing (CloudStore.get(url), S3.get(url), etc.) checked the region against a hard-coded set of 31 names. URLs in regions AWS opened since then (for example https://bucket.s3.ap-southeast-5.amazonaws.com/key, also ap-southeast-7, mx-central-1, ap-east-2) failed with ArgumentError: Validation failed for region before any request was sent.

validate_region now checks the shape of a region name (<area>-<subarea>…-<number>: us-east-1, ap-southeast-5, us-gov-west-1), so new regions keep working. A typo such as us-eest-1 now passes validation and fails at DNS instead.

Test change: the negative case used no-region-1, which is well formed; it now uses the malformed no_region, and four real regions (two of them missing from the old list) parse. 119/119 pass; on main the new-region cases error. Full suite passes locally.

🤖 Generated with Claude Code

URL parsing checked regions against a hard-coded set of 31 names, so URLs in
regions AWS opened since (ap-southeast-5, ap-southeast-7, mx-central-1,
ap-east-2, ...) failed with "Validation failed for `region`" before any
request. Check the shape of a region name instead: <area>-<subarea>...-<n>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.31%. Comparing base (4ae439c) to head (6532401).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #94   +/-   ##
=======================================
  Coverage   90.31%   90.31%           
=======================================
  Files           8        8           
  Lines        1053     1053           
=======================================
  Hits          951      951           
  Misses        102      102           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@quinnj
quinnj merged commit ee2ce31 into main Oct 22, 2026
7 checks passed
@quinnj
quinnj deleted the claude/region-shape branch October 22, 2026 17:10
@quinnj quinnj mentioned this pull request Oct 22, 2026
quinnj referenced this pull request Oct 22, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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