Repository navigation
fix(deploy): match Cloudflare's Worker size limit on Void Cloud - #439
Merged
Merged
Conversation
Managed deploys sent every Worker module as base64 inside the deploy request, which the API caps at 64 MiB. Source maps, which @cloudflare/vite-plugin 1.64 now emits by default, counted against that cap, so a Worker with 27 MB of code and 24 MB of maps failed with HTTP 413 although Cloudflare accepts it. The CLI now uploads Worker modules to R2 with presigned PUTs and names them in the deploy request. The API checks Cloudflare's limit (64 MiB without source maps) before it issues the URLs, then streams the modules from R2 into the Cloudflare upload one at a time, checking size and SHA-256 as the bytes pass. Old CLIs keep the inline path; the new CLI uses the direct path only when platform discovery advertises it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…er uploads A finalize retry with the same idempotency key now finds the admitted operation before the API lists the upload, so it gets the receipt even after the operation's input cleanup deleted the modules. The CLI asks platform discovery once more when the first answer was unusable, so one failed probe does not send a large Worker inline. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-deploy-worker-size-limit-void-cloud.voidzero-docs.workers.dev (commit a64905d)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Void Cloud refused Workers that Cloudflare accepts. The napi.rs deploy failed with:
@cloudflare/vite-plugin1.64 writes Worker source maps by default. The CLI sent every Worker module, as base64, inside the deploy request, so the maps counted against the API's 64 MiB body cap.Raising the cap does not fix it. The API Worker has 128 MB per isolate and held about two full copies of the modules: one while it parsed the body, and one in the
FormDatait sent to Cloudflare.What this PR changes
Worker modules now take the same path as static assets. The API streams them to Cloudflare and never holds the whole bundle.
Old clients keep working:
A finalize retry with the same idempotency key finds the admitted operation before the upload is listed. It gets the receipt even after the operation's cleanup deleted the modules.
Decisions
Content-Lengthsigned into each PUT URL, checked again by one LIST at finalizeRollout
Known limits
workerFiles. The approval digest covers inline bytes only, so they keep the 64 MiB body limit. Changing that needs module digests in the approved artifact. That is a product decision, so this PR leaves it alone.MIN_PLATFORM_VERSIONreaches the release that ships this, the new CLI keeps the inline fallback for platforms withoutdirectWorkerUpload.Testing
vp run checkvp test runworkerInput(queued and inline execution, missing or wrong-size module, both fields sent, idempotent retry, reused upload id), streamed multipart (exact bytes, escaped names, mismatch, retry re-opens streams), Durable Object snapshot streaming, CLI path selection and request shapes🤖 Generated with Claude Code