Skip to content

[wrangler] Improve asset upload retry log message#13990

Merged
petebacondarwin merged 1 commit into
mainfrom
improve-asset-upload-retry-log
May 20, 2026
Merged

[wrangler] Improve asset upload retry log message#13990
petebacondarwin merged 1 commit into
mainfrom
improve-asset-upload-retry-log

Conversation

@petebacondarwin
Copy link
Copy Markdown
Contributor

@petebacondarwin petebacondarwin commented May 20, 2026

Improve the log message Wrangler emits when an asset upload attempt fails and is retried.

The previous message just said Asset upload failed. Retrying... and appended the raw error object to the user-facing info log. That made the output noisy and gave no indication of how many attempts had been made.

This change:

  • Includes the attempt count in the info log, e.g.:

    Asset upload failed. Retrying... 1 of 5 attempts.
    
  • Routes the underlying error to logger.debug(e) instead of including it in the info log, so the user-facing output stays clean and the error is still available with WRANGLER_LOG=debug.


  • 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 is a small change to a developer-facing log line; it does not affect documented behavior.

Open in Devin Review

Show the attempt count in the user-facing 'Asset upload failed.
Retrying...' info log (e.g. '1 of 5 attempts'), and move the raw error
to debug-level logging so it no longer leaks into the info output.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 20, 2026

🦋 Changeset detected

Latest commit: 2830275

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

This PR includes changesets to release 3 packages
Name Type
wrangler Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers 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 May 20, 2026
@workers-devprod workers-devprod requested review from a team and emily-shen and removed request for a team May 20, 2026 20:29
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented May 20, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented May 20, 2026

I've reviewed the full diff carefully. The changes are clean and correct:

  1. Source change (assets.ts): The retry log message now includes attempts + 1 of MAX_UPLOAD_ATTEMPTS, and the raw error is moved from logger.info to logger.debug. The attempts + 1 correctly reflects the number of the current failing attempt since attempts starts at 0 and is incremented after this log line.

  2. Test (assets.test.ts): Well-structured test that fails the first upload, succeeds on the second, and asserts: (a) two upload requests were made, (b) the info log contains the attempt-count message, (c) the error string doesn't leak into info, (d) the error appears in debug. Follows repo conventions (destructured expect, proper MSW usage, vi.stubEnv for debug logging).

  3. Changeset: Correct patch bump for wrangler, clear description.

No logic bugs, no security issues, no backward compatibility concerns.

LGTM

github run

@github-actions
Copy link
Copy Markdown
Contributor

✅ All changesets look good

Copy link
Copy Markdown
Contributor

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

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 potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 20, 2026

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@13990

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

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

wrangler

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

commit: 2830275

Copy link
Copy Markdown
Contributor

@workers-devprod workers-devprod left a comment

Choose a reason for hiding this comment

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

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk May 20, 2026
@petebacondarwin petebacondarwin enabled auto-merge (squash) May 20, 2026 20:36
@petebacondarwin petebacondarwin merged commit e04e180 into main May 20, 2026
59 of 60 checks passed
@petebacondarwin petebacondarwin deleted the improve-asset-upload-retry-log branch May 20, 2026 20:43
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk May 20, 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