Skip to content

[wrangler] Support temporary event accounts in R2 and Containers commands - #16036

Merged
edevil merged 1 commit into
mainfrom
acruz/temporary-r2-containers
Oct 6, 2026
Merged

edevil merged 1 commit into
mainfrom
acruz/temporary-r2-containers

Conversation

@edevil

@edevil edevil commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #15776. Event temporary accounts are now entitled to R2 and Containers, but wrangler r2 … and wrangler containers … rejected --temporary with Unknown argument: temporary, because no command in either namespace set behaviour.supportTemporary. Separately, --event-code only existed on deploy. A participant whose first command was an R2 or Containers command got an ordinary temporary account, and recovering from that meant wrangler logout.

This PR:

  • Moves the hidden --event-code option and its coercion from deploy into src/core/temporary-commands.ts, and the "--event-code requires --temporary" check into the shared command handler. The option is now registered for every command that sets supportTemporary. Argv redaction, telemetry sanitization and the workers-auth cache-hit rejection were already command-agnostic. The validation telemetry messages are renamed from deploy event code … to temporary event code ….
  • Opts in the 39 R2 and Containers commands covered by the event deploy token: bucket create/list/info/delete/update, CORS, lifecycle, lock, dev-url, local-uploads, notifications, object get/put/delete, bulk put, and containers list/info/delete/instances/images/build/push/registries credentials/ssh.
  • Leaves out r2 bucket domain (needs a zone), r2 bucket sippy (needs another provider's credentials), containers registries configure/list/delete (external registries and Secrets Store), and the legacy cloudchamber commands.
  • Ordinary temporary accounts keep their existing permissions, so R2 and Containers commands only work on event accounts.

Temporary-account notices go to stderr since #16068, so r2 object get --remote --pipe --temporary and containers ssh --stdio --temporary keep stdout limited to the transferred data. A test covers the R2 case.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: --temporary and --event-code are intentionally hidden while event support rolls out.

Devin Review

@changeset-bot

changeset-bot Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9e79880

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
wrangler Minor
@cloudflare/vite-plugin Patch
@cloudflare/vitest-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk Oct 2, 2026
@workers-devprod
workers-devprod requested review from a team and jamesopstad and removed request for a team October 2, 2026 16:19
@workers-devprod

workers-devprod commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/cloudchamber
  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@ask-bonk

ask-bonk Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

LGTM!

github run

devin-ai-integration[bot]

This comment was marked as resolved.

@pkg-pr-new

pkg-pr-new Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@16036

@cloudflare/build-output-utils

npm i https://pkg.pr.new/@cloudflare/build-output-utils@16036

@cloudflare/codemods

npm i https://pkg.pr.new/@cloudflare/codemods@16036

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@16036

@cloudflare/containers-shared

npm i https://pkg.pr.new/@cloudflare/containers-shared@16036

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@16036

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@16036

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@16036

miniflare

npm i https://pkg.pr.new/miniflare@16036

@cloudflare/pages-functions

npm i https://pkg.pr.new/@cloudflare/pages-functions@16036

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@16036

@cloudflare/runtime-types

npm i https://pkg.pr.new/@cloudflare/runtime-types@16036

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@16036

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@16036

@cloudflare/vitest-plugin

npm i https://pkg.pr.new/@cloudflare/vitest-plugin@16036

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@16036

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@16036

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@16036

wrangler

npm i https://pkg.pr.new/wrangler@16036

commit: 9e79880

@edevil
edevil force-pushed the acruz/temporary-r2-containers branch from 3dcec64 to 7484832 Compare October 5, 2026 18:46
devin-ai-integration[bot]

This comment was marked as resolved.

@edevil
edevil force-pushed the acruz/temporary-r2-containers branch from 7484832 to 4816724 Compare October 5, 2026 18:52
devin-ai-integration[bot]

This comment was marked as resolved.

@edevil
edevil force-pushed the acruz/temporary-r2-containers branch 2 times, most recently from 4786356 to 726c2d0 Compare October 5, 2026 19:19

@dario-piotrowicz dario-piotrowicz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🙂

Comment thread .changeset/temporary-r2-containers.md Resolved

@dario-piotrowicz dario-piotrowicz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🙂

@dario-piotrowicz
dario-piotrowicz removed the request for review from jamesopstad October 6, 2026 14:59

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codeowners reviews satisfied

…ands

Opt the R2 and Containers commands covered by the event deploy token into
--temporary, and accept --event-code on every --temporary command so the
first command a participant runs can create the event account.
@edevil
edevil force-pushed the acruz/temporary-r2-containers branch from 726c2d0 to 9e79880 Compare October 6, 2026 16:10
@edevil
edevil merged commit 9a58244 into main Oct 6, 2026
60 checks passed
@edevil
edevil deleted the acruz/temporary-r2-containers branch October 6, 2026 18:58
brandhaug added a commit to brandhaug/b2b-saas-starter that referenced this pull request Oct 11, 2026
## pnpm-workspace.yaml (default)

## Dependency Updates

| Package | From | To | Type |
| --- | --- | --- | --- |
| `wrangler` | 4.148.0 | 4.149.0 | minor |

## Release Notes

<details>
<summary><b>wrangler</b> (4.148.0 → 4.149.0)</summary>

### Minor Changes

- [#16036](cloudflare/workers-sdk#16036)
[`9a58244`](cloudflare/workers-sdk@9a58244)
Thanks [@<!---->edevil](https://github.com/edevil)! - Support temporary
event accounts in R2 and Containers commands

`wrangler r2` and `wrangler containers` commands now accept the hidden
`--temporary` flag, so accounts created for an event can manage buckets,
objects and containers directly. Every command that supports
`--temporary` now also accepts a hidden `--event-code` flag, so the
first command a participant runs can create the event account:

  `wrangler r2 bucket create my-bucket --temporary --event-code <code>`

R2 and Containers are only available on event accounts. R2 custom
domains, Sippy, external container registries and `wrangler
cloudchamber` commands still require a logged-in account.

### Patch Changes

- [#16139](cloudflare/workers-sdk#16139)
[`2d1d563`](cloudflare/workers-sdk@2d1d563)
Thanks [@<!---->cpojer](https://github.com/cpojer)! - Update esbuild to
0.28.2

Align esbuild dependency with tooling using the latest 0.28 patch so
package managers can share one installation instead of downloading a
second native binary.

- [#15632](cloudflare/workers-sdk#15632)
[`85b14e7`](cloudflare/workers-sdk@85b14e7)
Thanks [@<!---->petebacondarwin](https://github.com/petebacondarwin)! -
Honor Retry-After directives during static asset uploads

Static asset uploads now pause retries and pending uploads until the
latest outstanding deadline requested by the API. A per-request limiter
also keeps gateway retries at the reduced concurrency after the pause
ends, preventing a deployment from immediately overloading a constrained
asset service again.

- [#16098](cloudflare/workers-sdk#16098)
[`fe607f9`](http

…[full
notes](https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.149.0)

</details>

---
*This PR was auto-generated by
[catalog-update-action](https://github.com/brandhaug/catalog-update-action).*

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants