Build custom rollout mechanism

Hi, I'm interested in building a custom rollout / versioning mechanism against the stored versions of workers. In pages, you are able to point to a specific version of the code at any given time since there is a deployment url for each build. I'm interested in doing something similar with Workers, given the worker versioning that was released more recently, but it seems that those versions aren't available at any time, they are only available if rolled back to. I'm wondering if I'm missing something, or if I'm correct in my analysis that the worker versions aren't currently available to be called at any given time?
4 Replies
Walshy
Walshy•4w ago
I'd recommend not building a custom rollout thing, Gradual Deployments exist - https://developers.cloudflare.com/workers/configuration/versions-and-deployments/gradual-deployments/ and for previews, we got those too: https://developers.cloudflare.com/workers/configuration/previews/
jman
jmanOP•4w ago
I love that these exist!! Unfortunately, neither fully address my needs One desire is version pinning of the API version (worker version) against the app version, to maintain stable behaviors. Another desire is for rollouts to be gated by flags on individual users (eg. Internal rollout happens 24 hours earlier then public rollout)
Walshy
Walshy•4w ago
Ah I see! I'd love to build a feature flag system for cf but yep fair
One desire is version pinning of the API version (worker version) against the app version, to maintain stable behaviors.
Can you explain more about this?
jman
jmanOP•4w ago
Hehe, so would I, if you're hiring 😉 What I mean is: Many versions of a mobile app could be running at the same time (also applicable to web, but significantly less prevalent since pages will update on refresh); these apps were built to work against a version of the API. To ensure these old versions of apps continue to work, one solution is to ensure the API surface remains stable, eliminating breaking changes. Or... my curiosity is telling me there might be a solution where I pin the worker that gets called to the version of the app that is calling it. (there are other risks associated with this, but it was a point of exploration / curiosity)

Did you find this page helpful?