Cloudflare deploy refuses placement.region (targeted placement) once the Worker has secrets
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
Start with packages/void/src/cli/cf-version-api.ts and inspect placementFromOutput, then trace the Cloudflare deploy flow that uploads and deploys Worker versions. Compare the beta version endpoint behavior with the classic Wrangler upload path; the issue describes several possible approaches but leaves the design open. Done means targeted placement works for Workers with secrets without risking deployment of a version whose placement was dropped.
由索引模型根据 Issue 内容生成。
描述
Summary
void deploy --platform cloudflare refuses cloudflare.placement with a region (also host / hostname) once the Worker has any secret. The only option left is { mode: 'smart' }.
Cloudflare placement.region cannot be deployed while the Worker has secrets. Remove cloudflare.placement from void.config.ts, or set it to { mode: 'smart' }.
Thrown from placementFromOutput in packages/void/src/cli/cf-version-api.ts (still present in v1.2.1).
Why it matters
Targeted placement is how you keep a Worker next to a single-region database. Our Worker talks to Postgres in us-east-1 through Hyperdrive, so we need placement: { region: 'aws:us-east-1' }. Smart placement takes time to learn and doesn't guarantee that. Almost every production Worker has secrets, so in practice this rule rules out targeted placement for real apps on Void. Plain Wrangler deploys the same config with no problem.
Repro
- Set
cloudflare: { placement: { region: 'aws:us-east-1' } }invoid.config.ts. void secret put SOME_SECRETvoid deploy --platform cloudflare: refused with the error above.
Notes
The code comment says this is on purpose: the Workers beta version endpoint can drop the target, and an atomic upload goes live before a read-back could catch it. Some possible ways forward:
- Fall back to Wrangler's / the classic upload path when targeted placement is set, or
- Upload a version without deploying it, read it back to confirm
placement, then deploy it, or - Deploy and then verify (and roll back on a mismatch), behind an opt-in flag.
Seen on 1.1.12, still present in 1.2.1.
- 主要语言
- TypeScript
- 星标
- 580
- 派生
- 56
- 平均合并
- 8 小时 36 分钟
- 30 天内合并 PR
- 110
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
voidzero-dev/void 的其他 Issue
-
Static Cloudflare deploy ignores `cloudflare.assets.html_handling`可能已有人在做 @0froq 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 77/100
voidzero-dev/void#580 ·
维护者通常 1 天内回复
-
`void/log` serializes `Error` fields as `{}`, losing message and stack可能已有人在做 @RaphaelFakhri 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
voidzero-dev/void#577 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
voidzero-dev/void#576 ·
维护者通常 1 天内回复
-
Dev: `better-auth/client/plugins` fails to resolve when auth is enabled (the `better-auth/client` alias matches it as a prefix)可能已有人在做 @MaxtuneLee 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
voidzero-dev/void#565 ·
维护者通常 1 天内回复
-
prepareDeployArtifact omits worker.vars that the CLI managed deploy includes可能已有人在做 @dvkam 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
voidzero-dev/void#529 ·
维护者通常 1 天内回复
查看 voidzero-dev/void 的全部 Issue
相似的 Issue
-
freshness freshness:observed-only
难度 2/5 1-3 小时 新手友好度 68/100
thoroc/context-radar#282 ·
-
bug P2 rust
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
area: web
难度 2/5 1-3 小时 新手友好度 85/100
gabe-santana/arkdraw#25 ·
-
bug require-triage
难度 2/5 1-3 小时 新手友好度 72/100
expressjs/expressjs.com#2549 · 1 个 reaction ·
维护者通常 1 天内回复
-
bug good first issue hacktoberfest
难度 2/5 1-3 小时 新手友好度 88/100
codercops/discord-bot#101 · 1 条评论 ·
维护者通常 1 天内回复