Skip to content

[deploy-helpers] recover asset upload concurrency after gateway errors - #15631

Merged
petebacondarwin merged 4 commits into
mainfrom
fix/asset-upload-concurrency-recovery
Sep 14, 2026
Merged

petebacondarwin merged 4 commits into
mainfrom
fix/asset-upload-concurrency-recovery

Conversation

@petebacondarwin

@petebacondarwin petebacondarwin commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Partially addresses #15060.

After a 524 response, the asset uploader reduces concurrency to one but never restores it. For large asset sets, a single transient gateway error can therefore serialize thousands of remaining uploads, greatly increasing deployment time and the risk of build or upload-session timeouts.

This change gradually restores the original concurrency limit after successful uploads. Recovery is generation-gated so requests already in flight when throttling occurred cannot immediately undo the backpressure. Tests cover both legacy base64 uploads and the single-file upload path.

Retry-After handling is intentionally kept out of this PR and will follow separately.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: This changes internal upload retry and concurrency behavior without changing user-facing configuration or APIs.

Note

This is a contribution from an AI agent: Codex (GPT-5).


Devin Review

@changeset-bot

changeset-bot Bot commented Sep 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5f7390f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@cloudflare/deploy-helpers Patch
wrangler Patch
@cloudflare/remote-bindings Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk Sep 13, 2026
@workers-devprod
workers-devprod requested review from a team and dario-piotrowicz and removed request for a team September 13, 2026 11:06
@workers-devprod

workers-devprod commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

I'm Bonk, and I've done a quick review of your PR.

Restores asset-upload concurrency gradually after gateway errors.

  1. High: New test times out before the six-second retry/gateway backoff completes. Posted one inline suggestion.

github run

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@pkg-pr-new

pkg-pr-new Bot commented Sep 13, 2026

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@15631

@cloudflare/build-output-utils

npm i https://pkg.pr.new/@cloudflare/build-output-utils@15631

@cloudflare/codemods

npm i https://pkg.pr.new/@cloudflare/codemods@15631

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@15631

@cloudflare/containers-shared

npm i https://pkg.pr.new/@cloudflare/containers-shared@15631

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@15631

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@15631

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@15631

miniflare

npm i https://pkg.pr.new/miniflare@15631

@cloudflare/pages-functions

npm i https://pkg.pr.new/@cloudflare/pages-functions@15631

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@15631

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@15631

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@15631

@cloudflare/vitest-plugin

npm i https://pkg.pr.new/@cloudflare/vitest-plugin@15631

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@15631

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@15631

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@15631

wrangler

npm i https://pkg.pr.new/wrangler@15631

commit: 5f7390f

@dario-piotrowicz dario-piotrowicz 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.

Looks good to me, with just one small suggestion regarding the test 🙂

Comment thread packages/wrangler/src/__tests__/deploy/assets.test.ts Outdated

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Codeowners reviews satisfied

@petebacondarwin
petebacondarwin enabled auto-merge (squash) September 14, 2026 12:36
@petebacondarwin
petebacondarwin merged commit c4a6279 into main Sep 14, 2026
58 checks passed
@petebacondarwin
petebacondarwin deleted the fix/asset-upload-concurrency-recovery branch September 14, 2026 12:52
@github-project-automation github-project-automation Bot moved this from Untriaged to Done in workers-sdk Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants