Queue names aren't scoped per Worker/environment, so staging and production collide in one Cloudflare account
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 46/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- infrastructure
Research direction
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.
Written by the indexing model from the issue text.
Description
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
- An app with
queues/jobs.ts. - Deploy it as
app-stagingand asapp-productionin the same Cloudflare account. - Both Workers bind the single
jobsqueue. 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.tsfrom 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.
- Dominant language
- TypeScript
- Stars
- 627
- Forks
- 66
- Avg merge
- 14h 56m
- Merged PRs (30d)
- 170
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 62/100
voidzero-dev/void#677 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
voidzero-dev/void#680 ·
Maintainers usually reply within 1 day
-
`withValidator({ body })` rejects the multipart bodies that `useForm` and `action()` send for filesOpen
Difficulty 4/5 3-5 days Newbie friendliness 35/100
voidzero-dev/void#679 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
voidzero-dev/void#676 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 18/100
voidzero-dev/void#667 ·
Maintainers usually reply within 1 day
All issues in voidzero-dev/void
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
oxidecomputer/skepsis#102 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
kunchenguid/gh-axi#247 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lidge-jun/opencodex#8101 · 2 comments ·
Maintainers usually reply within 1 day
-
effort:S P3 refactor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nightscout/nocturne#3243 ·
Maintainers usually reply within 1 day