Repository navigation
fix(deploy): activate Workers that have no readiness URL - #711
Conversation
Skip the readiness probe on a later deploy when workers.dev is off and no route can reach the Worker, then activate the uploaded version. Do not suggest an account subdomain in that case. Co-authored-by: sayhola <sayhola@froq.me>
Reformat the deploy reference and Cloudflare guide tables so the format check accepts them. Co-authored-by: sayhola <sayhola@froq.me>
|
This looks good for Workers that are only reachable through service bindings but there are some issues: Can we limit this to Workers that we know have no HTTP routes, and keep failing otherwise? We should add regression tests for both of those patterns too. |
|
Thanks for the suggestion! Agreed. Skip only when we know the Worker has no HTTP routes: workers.dev off and an empty route list (e.g. service-binding only). |
A route that does not cover /__void/ready still has HTTP traffic. Fail that deploy before activation, and skip the probe only when workers.dev is off and the route list is empty.
cpojer
left a comment
There was a problem hiding this comment.
I think preserved routes can still bypass readiness, see version.ts:1368
Slop: routes: [] with preserveRoutes: true means remote routes are unknown. This check treats it as route-free and activates the candidate at 100% without probing, potentially serving a broken version on existing HTTP routes. The same happens on subsequent deployments that retain this preservation state.
resolvePreservedTraffic strips preserveRoutes onto previous.routes, so an empty previous annotation made the no-HTTP skip fire even when local config asked to preserve remote routes. Keep the original preserveRoutes intent and fail with preview-unavailable instead.
744a7ff to
3a46ef8
Compare
|
Sorry about that miss. Thanks for catching it! Fixed now ❤️ |
cpojer
left a comment
There was a problem hiding this comment.
Great, thanks for fixing this.
|
thanks for the patience 😇 |
Fixes #644
Description
Later deploys of a Worker with
workers_devoff and no route or Custom Domain now skip the readiness probe and activate the uploaded version, same as the first deploy. Whenworkers_devis on and there is no preview URL, deploy still fails and still asks forCLOUDFLARE_WORKERS_SUBDOMAIN. That subdomain hint is no longer shown whenworkers_devis off.--atomicstill refuses a Worker with no Durable Object migration history. Docs updated in the Cloudflare integration guide, deploy CLI reference, and the generated workflow comment ininit.Test
pnpm exec vp test run packages/deploy-cloudflare/test/unit/version.test.ts packages/void/test/unit/cloudflare-deploy.test.ts(713 tests)pnpm exec vp run --filter ./packages/deploy-cloudflare --filter ./packages/void typecheck