Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Queue names aren't scoped per Worker/environment, so staging and production collide in one Cloudflare account

未关闭
#547 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
46/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript

调研方向

Start in packages/void/src/cli/deploy-resources.ts and trace how desired.queues is built from analysis.queues and how suffixedResourceName is used for other resources. Check how void.config.ts queue declarations are handled. Done means staging and production deployments in one Cloudflare account get distinct queue names or can map logical names per environment, with their consumers bound to the intended queues.

由索引模型根据 Issue 内容生成。

描述

Summary

Queue names come straight from file paths (queues/emails.ts → emails) and get no Worker or environment suffix. Cloudflare queue names are unique per account, so two deployments of the same app in one account, such as staging and production, share or fight over the same queues.

Other resources don't have this problem. For example, R2 buckets get a Worker-scoped name through suffixedResourceName(workerName, 'storage'), but queues use the bare name (packages/void/src/cli/deploy-resources.ts, desired.queues = analysis.queues.map((q) => q.name), still present in v1.2.1).

Repro

  1. An app with queues/jobs.ts.
  2. Deploy it as app-staging and as app-production in the same Cloudflare account.
  3. Both Workers bind the single jobs queue. Staging's producer messages can reach production's consumer, and a queue can have only one consumer Worker, so the second deploy either takes over the consumer or fails.

We also tried to declare environment-specific queues ourselves under cloudflare in void.config.ts, but Void refused that, so there's no way around it from the app.

Expected

One of these:

  • Prefix or suffix queue names with the Worker or environment name, as other provisioned resources already do (for example app-staging-jobs), or
  • An explicit mapping in void.config.ts from logical queue name to Cloudflare queue name, per environment.

The common setup this blocks is staging and production in one Cloudflare account.

Seen on 1.1.12, still present in 1.2.1.

主要语言
TypeScript
星标
402
派生
32
平均合并
8 小时 32 分钟
30 天内合并 PR
111

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

voidzero-dev/void 的其他 Issue

查看 voidzero-dev/void 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。