Skip to content

fix(core): keep retried files out of earlier upload batches - #6688

Open
MohammediYunus wants to merge 1 commit into
transloadit:mainfrom
MohammediYunus:fix/retry-batch-ownership
Open

MohammediYunus wants to merge 1 commit into
transloadit:mainfrom
MohammediYunus:fix/retry-batch-ownership

Conversation

@MohammediYunus

@MohammediYunus MohammediYunus commented Oct 7, 2026 •

Copy link
Copy Markdown

When file B fails while file A is still uploading, retrying B clears its shared error. If A finishes first, the original batch can then report B as successful while B’s retry is still in flight.

This change transfers retried files out of earlier active batches when creating the new upload. The original result omits those files, as allowed by #5906, and the retry batch reports their outcome. Subsequent steps and final postprocessing cleanup in the original batch also exclude them.

Batches emptied by this transfer are removed, matching file-removal behavior and preventing recovery from restarting them as empty uploads. Their old custom result metadata is discarded; late addResultData calls remain safe no-ops. Uploads that intentionally start empty keep their existing behavior. This does not cancel plugin callbacks already running with a captured file list.

Resolves #5906.

Validation:

  • 13 new regression cases. Ten failed on the original implementation; a separate saved-state test caught and verified the emptied-batch recovery case during review.
  • Core browser suite: 207 passed, 3 skipped across 32 files in Chrome on macOS.
  • Existing GoldenRetriever browser recovery suite: 5 passed, no skips.
  • Core build, repository typecheck, full repository Biome CI check (948 files), targeted formatting and diff check pass.
  • Standalone reproduction changes from premature success for B to reporting only A in the first result.

The new overlapping-retry recovery regression simulates saved Core state. The existing GoldenRetriever tests exercise browser storage recovery, but do not cover that new concurrent-retry scenario end to end. Firefox/WebKit and the complete monorepo test suite were not run.

@changeset-bot

changeset-bot Bot commented Oct 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1ab9360

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

This PR includes changesets to release 2 packages
Name Type
@uppy/core Patch
uppy 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

This branch has not been deployed

No deployments
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.

Retried failed files can be included in successful result while still in flight

1 participant