Repository navigation
fix(sdk-recorder): cancel and abort failed multipart uploads - #3384
Open
vedanth-jadhav wants to merge 1 commit into
Open
vedanth-jadhav wants to merge 1 commit into
vedanth-jadhav wants to merge 1 commit into
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This branch was previously deployed
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.
The SDK aborts multipart uploads only for non-OK PUT responses. Presign/network failures leave their remote upload session open, concurrent parts continue after one fails, and an abort error can replace the actual part failure. A missing ETag can also reach completion as an empty receipt.
Give each upload's presign/PUT requests a shared cancellation signal. On a pre-completion failure, cancel siblings, drain their promises, and attempt one remote abort with its own ten-second deadline, then rethrow the original error. Reject missing ETags before completion, and clean up synchronous progress-callback failures too. Initiation failures have no known session to abort; completion failures remain outside this cleanup because the object may already have committed.
Validation on Linux x86_64 / Bun 1.4.4:
noUncheckedIndexedAccess), Biome and diff checks pass.Reproduce:
cd packages/sdk-recorder && bun test. Network order and storage responses are controlled fixtures; live S3/browser capture were not run. Remote abort is best effort and can add up to ten seconds when its endpoint stalls. The original failure remains visible if cleanup fails. Successful part sizes, concurrency, receipt contents and progress values are preserved. No dependencies, public APIs or generated files change. This is error cleanup rather than throughput optimization; checked current main/open work for overlap.

Confidence Score: 5/5
The PR appears safe to merge.Summary
The SDK now cancels sibling multipart requests after a part fails, waits for them to settle, and attempts one remote abort without replacing the original error.
Reviews (1) · Last reviewed commit: "fix(sdk-recorder): cancel and abort fail..." · Reviewed by Greptile