Skip to content

feat(blobs): add a --region flag to the blobs commands - #8521

Open
paulo wants to merge 3 commits into
mainfrom
pauloaraujo/run-3404-add-region-flag-to-blobs-commands
Open

paulo wants to merge 3 commits into
mainfrom
pauloaraujo/run-3404-add-region-flag-to-blobs-commands

Conversation

@paulo

@paulo paulo commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

The blobs:* commands opened every store without a region, so they could only ever read the default one. There was no way to target a store whose data is held in another region, which meant the CLI could not be used to confirm where data actually is.

The API path already honours the region, so this adds a --region flag to the four commands and passes it through to getStore. An unsupported value is rejected by the client with the list of supported regions.

Omitting the flag is unchanged behaviour: no region is sent, and the API picks its default.

Requires @netlify/blobs 11.1.0 (bumped here from 11.0.3) — that release is where region became an option on site-wide stores, so the flag does not type-check without it.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: c5ee10fd-902e-4590-ba87-b929d11c69e6

📥 Commits

Reviewing files that changed from the base of the PR and between 1e2da46 and 0308339.

📒 Files selected for processing (7)
  • docs/commands/blobs.md
  • src/commands/blobs/blobs-delete.ts
  • src/commands/blobs/blobs-get.ts
  • src/commands/blobs/blobs-list.ts
  • src/commands/blobs/blobs-set.ts
  • src/commands/blobs/blobs.ts
  • tests/integration/commands/blobs/blobs.test.ts
🔗 Linked repositories identified

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

  • netlify/blueprints (manual)

Included review availability: 9 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.


📝 Summary

Summary by CodeRabbit

  • New Features

    • Added an optional --region flag to the blobs:delete, blobs:get, blobs:list, and blobs:set commands.
    • Commands use the default region when no region is specified and validate supported region values.
    • Added region-specific usage guidance and examples for blob commands.
  • Tests

    • Added coverage verifying regional requests, default behavior, and rejection of unsupported regions.

Walkthrough

Added an optional --region option to the blobs:delete, blobs:get, blobs:list, and blobs:set commands. Each command forwards the region to getStore. Documentation and integration tests cover regional requests, omitted regions, and unsupported regions.

Priority: ⬇️ Low

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

Change: Feature

Suggested reviewers: serhalp

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: adding a --region flag to the blobs commands.
Description check ✅ Passed The description directly explains the existing limitation, the new --region flag, default behavior, validation, and required dependency update.
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 6…
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
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

The commands opened every store without a region, so they could only ever
read the default one, with no way to target a store whose data is held
elsewhere.

The API path already honours the region, so this passes the flag through to
`getStore`. Omitting the flag sends no region at all, exactly as before.

Needs `region` on `GetStoreOptions`, which @netlify/blobs 11.1.0 added and
main already depends on.
@paulo
paulo force-pushed the pauloaraujo/run-3404-add-region-flag-to-blobs-commands branch from bb15611 to c888f27 Compare September 21, 2026 15:45
@github-actions

Copy link
Copy Markdown

📊 Benchmark results

Comparing with 1e2da46

  • Dependency count: 1,073 (no change)
  • Package size: 422 MB (no change)
  • Number of ts-expect-error directives: 346 (no change)

@pkg-pr-new

pkg-pr-new Bot commented Sep 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/netlify-cli@8521

commit: 0308339

Generated by `npm run docs`, which the verify-docs check regenerates and
compares.
Regenerated on the Node version CI pins. `sortOptions` returns -1 whenever
either side is a base flag, so the order it produces depends on the sort
implementation and differs between Node versions.
@paulo
paulo marked this pull request as ready for review September 21, 2026 17:08
@paulo
paulo requested review from a team as code owners September 21, 2026 17:08
@paulo
paulo requested a review from eduardoboucas September 21, 2026 17:08
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