Skip to content

fix(upload): do not finish chunked uploads after the first chunk - #1746

Merged
skjnldsv merged 1 commit into
mainfrom
fix/chunked-progress
Sep 16, 2026
Merged

skjnldsv merged 1 commit into
mainfrom
fix/chunked-progress

Conversation

@susnux

@susnux susnux commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

#uploadChunk is shared by the chunked and non-chunked path, but set uploadedBytes to the full file size and the status to FINISHED once its chunk was acknowledged.

For a chunked upload this happened for every chunk: the reported progress exceeded 100% (~130% for a 21 MiB file), the upload was FINISHED while still uploading and assembling, a failed chunk was flipped back to FINISHED by the next successful one, and Uploader.reset() skipped the upload as it "is finished".

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

`#uploadChunk` is shared by the chunked and non-chunked path, but set
`uploadedBytes` to the full file size and the status to `FINISHED` once
its chunk was acknowledged. For a chunked upload this happened for every
chunk: the reported progress exceeded 100% (~130% for a 21 MiB file), the
upload was `FINISHED` while still uploading and assembling, a failed chunk
was flipped back to `FINISHED` by the next successful one, and
`Uploader.reset()` skipped the upload as it "is finished".

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
susnux requested a review from skjnldsv September 16, 2026 17:40
@susnux susnux added type: bug 🐛 Something isn't working 3. to review 3️⃣ Waiting for reviews labels Sep 16, 2026
@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.55%. Comparing base (ba0f6d0) to head (2d058dd).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1746      +/-   ##
==========================================
+ Coverage   87.18%   87.55%   +0.36%     
==========================================
  Files          44       44              
  Lines        1116     1125       +9     
  Branches      280      280              
==========================================
+ Hits          973      985      +12     
+ Misses        107      103       -4     
- Partials       36       37       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@skjnldsv
skjnldsv merged commit 0e21f9d into main Sep 16, 2026
13 checks passed
@skjnldsv
skjnldsv deleted the fix/chunked-progress branch September 16, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review 3️⃣ Waiting for reviews type: bug 🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants