Skip to content

Run multiple workers with specific environment on both #10350

@zalmanlew

Description

@zalmanlew

I have two workers
Worker A and B

Both workers have the default environment at the top-level as well as a dev one.

A includes a binding for B (via RPC)

When running locally, I want to run both at once but using my dev env on both

this is the binding from Worker A wrangler

{
  "binding": "WORKER_B",
  "service": "worker-b-dev"
}

using this command to run both at once

wrangler dev -c ./wrangler.jsonc -c ../worker-b/wrangler.jsonc -e=dev --local --persist-to .wrangler

This fails to find worker-b-dev and only works if I change the service binding to worker-b (dropping the -dev)

I need to keep the -dev because when I deploy my dev environment it's named worker-b-dev

How can I get it working when running locally?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions