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
平均合併
10 小時 18 分鐘
30 天內合併 PR
113

環境準備

這個專案沒有提供開發容器、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 摘要。