-
Notifications
You must be signed in to change notification settings - Fork 778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 BUG: Different workers created for different environments #921
Comments
This is working as designed https://developers.cloudflare.com/workers/platform/environments/#naming. We also have newer service environments https://developers.cloudflare.com/workers/learning/using-services/ which is a first class abstraction that succeeds the existing environments and would work as you desire, but we'll enable them by default in wrangler only after they become generally available, which should happen soon later this year. |
@threepointone so what's the point of "environments" in the dashboard? We can create environments in the dashboard, but can't deploy to them?! |
Sorry for the frustration. We probably jumped the gun by enabling them in the dashboard as early as we did before we had proper wrangler support. If you're interested, we have experimental support for service environments in wrangler, which you can enable by passing Again, sorry about this, we're actively working on fixing this. |
@threepointone understood, thanks. |
Can you pls point to the gh-issue that tracks this effort for wrangler2? Edit: Found it #27 |
What version of
Wrangler
are you using?1.19.12
What operating system are you using?
MacOS 12.3.1
Describe the Bug
Wrangler is adding the environment name to the worker while publishing, which creates separate workers for each environment.
For example, I have a worker named "foo".
wrangler publish --env production
creates a new workerfoo-production
andwrangler publish --env staging
creates a new workerfoo-staging
.Reproduce the bug
A list of steps to reproduce the bug.
wrangler generate foo
.production
andstaging
environments towrangler.toml
(as below).wrangler publish --env production
.wrangler publish --env staging
.Expected behavior
Only a single worker will be created named "foo" with two environments "production" and "staging". Instead, it's creating two workers with both of them having a production environment.
The text was updated successfully, but these errors were encountered: