fix(upload): honor root and retries upload options - #1745
Merged
Merged
Conversation
Both options were declared and documented on `UploadOptions` but never read: `upload()` and `batchUpload()` hard-coded the uploader destination as the base, and `retries` was spread into `UploadFile`, which only destructured `headers` and `noChunking` - so chunk workspace creation used a hard-coded 5 and the upload request got no retry count at all. `upload()` and `batchUpload()` now resolve their target via a shared helper falling back to the uploader destination, and `retries` (default 5) is stored on `UploadFile`/`UploadFileTree`, forwarded to `uploadData`/`initChunkWorkspace` and propagated to child uploads. Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1745 +/- ##
==========================================
- Coverage 87.42% 87.18% -0.24%
==========================================
Files 44 44
Lines 1121 1116 -5
Branches 281 280 -1
==========================================
- Hits 980 973 -7
- Misses 105 107 +2
Partials 36 36 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
skjnldsv
approved these changes
Sep 16, 2026
skjnldsv
left a comment
Contributor
There was a problem hiding this comment.
Much cleaner! 👍
Was a bit confused by the extend initially, but the options forwarding simplicity speaks for itself
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both options were declared and documented on
UploadOptionsbut never read:upload()andbatchUpload()hard-coded the uploader destination as the base, andretrieswas spread intoUploadFile, which only destructuredheadersandnoChunking- so chunk workspace creation used a hard-coded 5 and the upload request got no retry count at all.🤖 AI (if applicable)