Skip to content

feat(blobs): accept a region for site-wide stores - #773

Open
paulo wants to merge 1 commit into
mainfrom
feat/blobs-site-store-region
Open

feat(blobs): accept a region for site-wide stores#773
paulo wants to merge 1 commit into
mainfrom
feat/blobs-site-store-region

Conversation

@paulo

@paulo paulo commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Adds region to GetStoreOptions, so it can be passed to getStore for site-wide stores.

The client already forwarded and validated a region given to getStore — the option was just missing from the public type, so TypeScript rejected it and nothing documented it. This makes it supported rather than incidental.

No behaviour change. Site-wide stores still send no region unless one is given, and still do not inherit primaryRegion from the environment the way deploy-scoped stores do. Tests cover both defaults and the explicit option.

The client already forwarded a `region` supplied to `getStore`, but the
option was absent from `GetStoreOptions`, so TypeScript rejected it and
nothing documented it. Add it to the public interface.

Behaviour is unchanged: site-wide stores still send no region unless one
is given, and do not inherit `primaryRegion` from the environment the way
deploy-scoped stores do. Tests cover both.

Ref: RUN-3349
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 8b9f4e0f-fe6f-42f4-a3f6-fc72a197aef5

📥 Commits

Reviewing files that changed from the base of the PR and between 0dfd5a0 and 8cc553d.

📒 Files selected for processing (2)
  • packages/blobs/src/main.test.ts
  • packages/blobs/src/store_factory.ts
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • netlify/blueprints (manual)

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Summary

Summary by CodeRabbit

  • New Features
    • Site-wide blob stores now support an optional region setting.
    • When no region is specified, the API selects its default region instead of inheriting the site’s configured Functions region.
    • Explicitly selected regions are applied consistently across API and edge operations.
    • Invalid region values are rejected with an error.

Walkthrough

Adds an optional region option for site-wide stores. Site-wide stores omit the region by default and do not inherit it from the environment. Explicit regions are forwarded to API and edge calls, including the string-name overload. Unsupported regions are rejected. Tests cover these behaviors.

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

Merge Risk: ⚪ Minimal · up to 8cc55

This makes existing site-wide store region selection available to TypeScript callers without changing the default behavior. Explicit regions are covered across request paths, with no remaining merge-blocking risk.

Suggested reviewers: eduardoboucas

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding region support for site-wide blob stores.
Description check ✅ Passed The description directly explains the public type change, existing behavior, and test coverage. It is related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/blobs-site-store-region

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: dependency version conflict. Check your lock file or package.json.


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

@pkg-pr-new

pkg-pr-new Bot commented Sep 8, 2026

Copy link
Copy Markdown

Open in StackBlitz

@netlify/ai

npm i https://pkg.pr.new/@netlify/ai@773

@netlify/aws-lambda-compat

npm i https://pkg.pr.new/@netlify/aws-lambda-compat@773

@netlify/blobs

npm i https://pkg.pr.new/@netlify/blobs@773

@netlify/cache

npm i https://pkg.pr.new/@netlify/cache@773

@netlify/dev

npm i https://pkg.pr.new/@netlify/dev@773

@netlify/dev-utils

npm i https://pkg.pr.new/@netlify/dev-utils@773

@netlify/headers

npm i https://pkg.pr.new/@netlify/headers@773

@netlify/images

npm i https://pkg.pr.new/@netlify/images@773

@netlify/otel

npm i https://pkg.pr.new/@netlify/otel@773

@netlify/redirects

npm i https://pkg.pr.new/@netlify/redirects@773

@netlify/runtime

npm i https://pkg.pr.new/@netlify/runtime@773

@netlify/runtime-utils

npm i https://pkg.pr.new/@netlify/runtime-utils@773

@netlify/static

npm i https://pkg.pr.new/@netlify/static@773

@netlify/types

npm i https://pkg.pr.new/@netlify/types@773

@netlify/database-dev

npm i https://pkg.pr.new/@netlify/database-dev@773

@netlify/database

npm i https://pkg.pr.new/@netlify/database@773

@netlify/database-proxy

npm i https://pkg.pr.new/@netlify/database-proxy@773

@netlify/edge-functions-dev

npm i https://pkg.pr.new/@netlify/edge-functions-dev@773

@netlify/edge-functions

npm i https://pkg.pr.new/@netlify/edge-functions@773

@netlify/functions-dev

npm i https://pkg.pr.new/@netlify/functions-dev@773

@netlify/functions

npm i https://pkg.pr.new/@netlify/functions@773

@netlify/identity

npm i https://pkg.pr.new/@netlify/identity@773

commit: 8cc553d

@paulo
paulo marked this pull request as ready for review September 8, 2026 10:35
@paulo
paulo requested a review from a team as a code owner September 8, 2026 10:35
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