Skip to content

[BR-2136]: keep folder uploads running when individual files fail - #2075

Open
terrerox wants to merge 4 commits into
masterfrom
feat/folder-upload-partial-failure-retry
Open

[BR-2136]: keep folder uploads running when individual files fail#2075
terrerox wants to merge 4 commits into
masterfrom
feat/folder-upload-partial-failure-retry

Conversation

@terrerox

@terrerox terrerox commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Context

Users were seeing a folder upload reported as successful when the folder had not actually been uploaded: a single file failing mid-upload could kill the queue while the task logger still announced success, leaving the user with no signal that content was missing. This PR implements the solution proposed by the product team: keep uploading everything that can succeed, be honest about what failed, and give the user a way to retry exactly those files.

What changed

Folder uploads no longer abort and roll back when a single file fails. The manager marks the task with hasFailedFiles, lets the queue finish the remaining items, and announces the failure once the whole folder is done, keeping already-uploaded content. Referral tracking and network logging are skipped for partially failed folders.

Failed files land in the retry list grouped by their parent task, with duplicates replaced by taskId on re-add. Errors that can never succeed (402 payment required, file size exceeded) are marked non-retryable and shown as "Not allowed" in the retry modal instead of a retry button.

Also renames boolean flags to the is/has/should convention, fixes DEFAULT_OPTIONS being mutated via Object.assign in uploadItemsThunk, normalizes the two RetryableTask param shapes in TaskToRetryItem, and adds size props to TaskLoggerButton for the retry modal polish.

Related Issues

Related Pull Requests

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

Additional Notes

Folder uploads no longer abort and roll back when a single file fails.
The manager marks the task with hasFailedFiles, lets the queue finish the
remaining items, and announces the failure once the whole folder is done,
keeping already-uploaded content. Referral tracking and network logging
are skipped for partially failed folders.

Failed files land in the retry list with duplicates replaced by taskId on
re-add. Errors that can never succeed (402 payment required, file size
exceeded) are flagged non-retryable on their retry entries.

Also renames boolean flags to the is/has/should convention and fixes
DEFAULT_OPTIONS being mutated via Object.assign in uploadItemsThunk.
@terrerox
terrerox requested review from a team, CandelR and larryrider as code owners July 28, 2026 04:13
@terrerox terrerox self-assigned this Jul 28, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 28, 2026

Copy link
Copy Markdown

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: dcf5de1
Status: ✅  Deploy successful!
Preview URL: https://0b948ba0.drive-web.pages.dev
Branch Preview URL: https://feat-folder-upload-partial-f.drive-web.pages.dev

View logs

Comment thread src/app/network/RetryManager.ts Outdated
}

addTasks(tasks: RetryableTask[]) {
// A task can only appear once per taskId: re-adding a failed task replaces its entry

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 would add JSDoc to this function rather than this comment

@terrerox
terrerox requested a review from sg-gs July 28, 2026 14:26
sg-gs
sg-gs previously approved these changes Jul 28, 2026
Base automatically changed from refactor/uploadManager-and-uploadManagerFolder to master July 28, 2026 14:40
@terrerox
terrerox dismissed sg-gs’s stale review July 28, 2026 14:40

The base branch was changed.

@terrerox
terrerox requested a review from sg-gs July 30, 2026 14:27
@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants