Skip to content
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

Clarify how Worker Service environments interact with wrangler.toml environments #2720

Closed
irvinebroque opened this issue Nov 16, 2021 · 4 comments
Assignees
Labels
documentation Documentation edits

Comments

@irvinebroque
Copy link
Contributor

Expected Behavior

Worker services have environments. Wrangler also has the concept of environments.

Reading the Worker Services blog post, I expected there to be some connection between a service environment and an environment in wrangler. This doesn't seem to be the case, but there aren't any docs (AFAIK) on worker services yet so I'm not entirely sure. Clarifying this would help route issues and feedback to the right place - is rationalizing this a wrangler problem to solve? Something to be addressed in Wrangler 2?

Actual Behavior

Worker services have options in the dashboard to configure environments, but no documentation or API referenced in the Wrangler/Workers docs.

Section that requires update

https://developers.cloudflare.com/workers/cli-wrangler/configuration#environments was the first place I looked to find this information.

@irvinebroque irvinebroque added the documentation Documentation edits label Nov 16, 2021
@haleycode haleycode added this to the Pages and Workers milestone Nov 17, 2021
@MichaelPeterJoyce
Copy link

I also want to bump this to try and get some documentation on how to set this up.

https://blog.cloudflare.com/introducing-worker-services/

Our team is excited to try this out especially the promote to environment part but their is zero documentation on how any of this works with wrangler.toml

@jkup jkup self-assigned this Dec 6, 2021
@ptim
Copy link

ptim commented Dec 23, 2021

This is still confusing me… AFAICT there's no overlap, and no way to control Service environments via wrangler… I think I need to use a fake DIY MODE flag in wrangler, and completely ditch wrangler environments so that different versions of the script deployed can operate on the same routes? I may be way off the mark :(

Still figuring this out the slow way, and I'm basically using staging domain and not relying on any built-in environment functionality. My messaging back to my management is that "workers we deploy are rock solid, and Just Work™" (that's been my experience!), ...but "we've opted into the bleeding edge for this new project, and there are big gains (miniflare!, promise of versioned services), but there are sharp edges and bottomless pits"

The word on discord is:

Workers Environments via Wrangler are separate from service environments at this time. As you noted, an environment in wrangler will create a whole new service with a suffix. wrangler2 will be fixing this, and provide some kind of migration strategy, and you can follow cloudflare/workers-sdk#27 for further discussion.
CherryJimbo — Today at 02:24

That this issue is most recently mentioned in a 3-day-old issue planning for wrangler2.1 helps me set expectations 😄

But we do want to start thinking of (and implementing) features for v2.1. This issue tracks the big headline features for v2.1 (This list is subject to change)

It would be very helpful for me if there were notices in the docs summarising "this is in a state of flux, follow x issue for updates" 👍

@jkup
Copy link
Contributor

jkup commented Jul 6, 2022

I think this is a bit more clear now? Please let me know if it isn't, we know we've caused some confusion here. We temporarily removed the ability to create new Service Environments, adding a warning to the docs that they have been temporarily disabled while we fix things internally. Wrangler 1 and 2 both only support Wrangler Environments. We're hoping to come back with a much better and easier to explain story around Service Environments.

Note: Service Environments do and will continue to work just fine for folks already using them. Are there any other steps we should be taking right now?

Sorry for the confusion!

@jkup jkup removed their assignment Jul 6, 2022
@deadlypants1973
Copy link
Contributor

Closing as Worker Service environment documentation will be available after the feature has been released for GA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation edits
Projects
None yet
Development

No branches or pull requests

6 participants