wrangler-legacy
wrangler-legacy copied to clipboard
workers_dev defined at top-level is not inherited by environments
🐛 Bug report
Describe the bug
When using the wrangler.toml below:
name = "my-first-worker"
type = "webpack"
account_id = "..."
workers_dev = true
route = "..."
zone_id = "..."
[env.production]
zone_id = "..."
route = "..."
Then running:
wrangler publish --env production
It only deploys to the route, and not workers.dev. Since workers_dev is defined at the top-level, the production environment should "inherit" that value. As specified in our docs: https://developers.cloudflare.com/workers/cli-wrangler/configuration#keys
Expected behavior
The above sequence should deploy to both the route and workers.dev.
this is likely a regression introduced by https://github.com/cloudflare/wrangler/pull/1592
This issue has been automatically marked as stale because it has not had recent activity in the last 180 days. It will be closed if no further activity occurs in the next week. Please feel free to comment if you'd like it to remain open, and thank you for your contributions.
I can tell for sure that disabling the inherited worker_dev setting definitely works, as I had to do it today:
name = "webhooks"
type = "javascript"
workers_dev = true
compatibility_date = "2021-12-01"
[env.staging]
account_id = "..."
zone_id = "..."
routes = ["https://some.staging-domain.com/*"]
workers_dev = false
[env.production]
account_id = "..."
zone_id = "..."
routes = ["https://some.production-domain.com/*"]
workers_dev = false
Thanks for creating this issue! Wrangler v1 is now deprecated and support is only being provided for critical updates or security concerns. As such, we are closing this PR.
New versions of Wrangler are maintained in the workers-sdk repo. If you are running into a similar issue with wrangler v2, please report it or create a new PR in the workers-sdk repo. For more info about wrangler v1 deprecation, please check out our blog post.