Skip to content

fix(deploy): activate Workers that have no readiness URL - #711

Merged
cpojer merged 4 commits into
voidzero-dev:mainfrom
0froq:fix/deploy-skip-readiness-without-url
Nov 5, 2026
Merged

cpojer merged 4 commits into
voidzero-dev:mainfrom
0froq:fix/deploy-skip-readiness-without-url

Conversation

@0froq

@0froq 0froq commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Fixes #644

Description

Later deploys of a Worker with workers_dev off and no route or Custom Domain now skip the readiness probe and activate the uploaded version, same as the first deploy. When workers_dev is on and there is no preview URL, deploy still fails and still asks for CLOUDFLARE_WORKERS_SUBDOMAIN. That subdomain hint is no longer shown when workers_dev is off. --atomic still refuses a Worker with no Durable Object migration history. Docs updated in the Cloudflare integration guide, deploy CLI reference, and the generated workflow comment in init.

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

0froq added 2 commits November 4, 2026 14:06
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>
@cpojer

cpojer commented Nov 5, 2026

Copy link
Copy Markdown
Member

This looks good for Workers that are only reachable through service bindings but there are some issues: customRouteReadinessUrl() also returns undefined for routes like *.example.com/* or app.example.com/api/*. Those Workers do have HTTP traffic, but this now activates the new version at 100% without checking readiness.

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.

@0froq

0froq commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator Author

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). *.example.com/* and app.example.com/api/* still carry HTTP traffic and are not probe URLs, so those deploys will keep failing before activation. I'll add regression tests for both patterns.

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 cpojer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@0froq
0froq force-pushed the fix/deploy-skip-readiness-without-url branch from 744a7ff to 3a46ef8 Compare November 5, 2026 07:41
@0froq

0froq commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator Author

Sorry about that miss. Thanks for catching it! Fixed now ❤️

@0froq
0froq requested a review from cpojer November 5, 2026 07:43

@cpojer cpojer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks for fixing this.

@cpojer
cpojer merged commit b0070e0 into voidzero-dev:main Nov 5, 2026
18 checks passed
@0froq

0froq commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator Author

thanks for the patience 😇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

void deploy cannot deploy a Worker with no URL after its first deploy, and --atomic refuses it

2 participants