Cloudflare deploy fails with "binding X cannot be uploaded with pinned secrets" when Worker has a `ratelimits` binding and any secret
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 57/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start in void/dist/deploy-DsW-PrRQ.mjs around bindingsFromOutput (about line 1806), where the issue says the binding type switch omits ratelimit; compare the existing cases with the suggested Workers API mapping. Then find the relevant deploy tests and add coverage for a Worker with a ratelimits binding and an existing secret using the pinned uploader. Done means that deployment succeeds and preserves the secret.
Written by the indexing model from the issue text.
Description
Versions
void1.1.11,@void/deploy-cloudflare1.1.11 (latest on npm as of 2026-10-16)void deploy --platform cloudflare(direct Cloudflare target), Node 24, Workers Builds and local
Repro
- Project with a rate limit binding in
void.config.ts:cloudflare: { ratelimits: [ { name: "MY_RATE_LIMIT", namespace_id: "1001", simple: { limit: 30, period: 60 } }, ], } void deploy --platform cloudflare→ succeeds (Worker has no secrets yet).- Set any Worker secret (
void secret put FOO, orwrangler/cf workers secrets put). void deploy --platform cloudflareagain → fails:
Every subsequent deploy fails the same way while any secret exists.■ deploy: Cloudflare Worker Version upload failed (exit 1); production traffic is unchanged. Cloudflare binding MY_RATE_LIMIT cannot be uploaded with pinned secrets.
Root cause
@void/deploy-cloudflare/dist/index.mjs(activateCloudflareVersionWithSecretsFile, ~L1354): when the active version has any secret and no candidate secrets file is passed, Void callspinActiveSecretsand routes the upload throughuploadPinnedCloudflareVersion.- That uploader builds bindings with
bindingsFromOutput(void/dist/deploy-DsW-PrRQ.mjs~L1806–1981), whose switch handles text, json, kv, d1, r2, durable-object, queue, ai, browser, images, hyperdrive, worker, workflow, send-email, analytics-engine-dataset, vectorize, dispatch-namespace, assets, version-metadata — but has noratelimitcase, so it hitsdefault: throw new Error(\Cloudflare binding ${name} cannot be uploaded with pinned secrets.`)`. - Before the first secret, the normal
wrangler versions upload --prebuiltpath is used, which supportsratelimits— hence it only breaks once a secret exists.
Expected
Deploy succeeds and preserves existing secrets, as it does for other binding types.
Suggested fix
Add a ratelimit case to bindingsFromOutput mapping to the Workers API binding:
case "ratelimit":
bindings.push({
name,
type: "ratelimit",
namespace_id: requiredString(value.namespaceId ?? value.namespace_id, name),
simple: { limit: value.simple.limit, period: value.simple.period },
});
break;
(plus a test: Worker with ratelimits + an existing secret deploys via the pinned uploader). It may be worth auditing the switch against all binding types Void can emit (e.g. secrets_store_secrets, mtls_certificates, worker_loaders), and failing in a pre-upload check rather than mid-deploy.
Workaround
Remove ratelimits from the config (or delete all Worker secrets) to deploy.
- Dominant language
- TypeScript
- Stars
- 402
- Forks
- 32
- Avg merge
- 12h 1m
- Merged PRs (30d)
- 80
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from voidzero-dev/void
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
voidzero-dev/void#484 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
voidzero-dev/void#463 ·
Maintainers usually reply within 1 day
-
Deploy after a secret change fails for Workers over ~750 KB: source read-back capped at 1 MiBPossibly taken @Brooooooklyn claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
voidzero-dev/void#459 · 1 assignee ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
voidzero-dev/void#428 ·
Maintainers usually reply within 1 day
-
Allow `npm create void` and `void init` to run without promptsPossibly taken @ashunar0 claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 57/100
voidzero-dev/void#491 · 1 comment ·
Maintainers usually reply within 1 day
All issues in voidzero-dev/void
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
radix-ui/primitives#4228 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
SignalK/freeboard-sk#1093 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
[测试] 等待仓库加载后再记录多仓库排序基线Possibly taken @myot233 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day