Cloudflare deploy fails with "binding X cannot be uploaded with pinned secrets" when Worker has a `ratelimits` binding and any secret
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 57/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- TypeScript
- 星號
- 402
- 分支
- 32
- 平均合併
- 12 小時 1 分鐘
- 30 天內合併 PR
- 80
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
voidzero-dev/void 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
voidzero-dev/void#484 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
voidzero-dev/void#463 ·
維護者通常 1 天內回覆
-
Deploy after a secret change fails for Workers over ~750 KB: source read-back capped at 1 MiB可能已有人在做 @Brooooooklyn 於 1 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 82/100
voidzero-dev/void#459 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
bug
難度 1/5 1-3 小時 新手友好度 78/100
voidzero-dev/void#428 ·
維護者通常 1 天內回覆
-
Allow `npm create void` and `void init` to run without prompts可能已有人在做 @ashunar0 今天認領。 未關閉
難度 4/5 3-5 天 新手友好度 57/100
voidzero-dev/void#491 · 1 則留言 ·
維護者通常 1 天內回覆
查看 voidzero-dev/void 的全部 Issue
相似的 Issue
-
area:workflow bug ready-for-human
難度 1/5 1 小時以內 新手友好度 78/100
fil-donadoni/tolaria#6108 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
apache/rocketmq-dashboard#7234 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
vitest-dev/vitest#11656 ·
維護者通常 1 天內回覆
-
e2e-failure ready-to-code
難度 2/5 1-3 小時 新手友好度 68/100
redhat-developer/rhdh-plugin-export-overlays#4460 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
ehmpathy/rhachet-roles-bhrain#655 ·
維護者通常 1 天內回覆