-
Couldn't load subscription status.
- Fork 867
Add UploadIniaited, Completed, and Failed event progress trackers to MultipartUploadCommand #4041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add UploadIniaited, Completed, and Failed event progress trackers to MultipartUploadCommand #4041
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive multipart upload lifecycle event tracking to the S3 Transfer Utility, including initiated, completed, and failed events for both seekable and unseekable streams. It also introduces response mapping functionality to convert CompleteMultipartUploadResponse to TransferUtilityUploadResponse for consistent response handling.
Key changes:
- Added lifecycle event handling (initiated, completed, failed) for multipart uploads
- Implemented response mapping between CompleteMultipartUploadResponse and TransferUtilityUploadResponse
- Enhanced progress tracking with comprehensive test coverage for various upload scenarios
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ResponseMapperTests.cs | Added comprehensive unit tests for CompleteMultipartUploadResponse mapping validation |
| TransferUtilityTests.cs | Added extensive integration tests for multipart upload lifecycle events |
| MultipartUploadCommand.async.cs | Integrated lifecycle event firing and response mapping in async multipart upload flow |
| ResponseMapper.cs | Implemented mapping logic from CompleteMultipartUploadResponse to TransferUtilityUploadResponse |
| MultipartUploadCommand.cs | Added event firing helper methods and enhanced progress tracking |
| dev config | Added patch-level configuration with appropriate changelog messages |
Comments suppressed due to low confidence (1)
sdk/src/Services/S3/Custom/Transfer/Internal/_async/MultipartUploadCommand.async.cs:1
- The UploadProgressArgs constructor call has been modified to include an additional parameter (_fileTransporterRequest). This appears to be a breaking change to the UploadProgressArgs constructor signature. Breaking changes should be avoided in patch releases and require justification or a major version bump.
/*
| }; | ||
|
|
||
| // Use invalid bucket name to force failure with multipart upload size | ||
| var invalidBucketName = "invalid-bucket-name-" + Guid.NewGuid().ToString(); |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The invalid bucket name generation logic is duplicated across multiple test methods. Consider extracting this into a helper method to improve maintainability and ensure consistency.
| }; | ||
|
|
||
| // Use invalid bucket name to force failure with multipart upload size | ||
| var invalidBucketName = "invalid-bucket-name-" + Guid.NewGuid().ToString(); |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The invalid bucket name generation logic is duplicated across multiple test methods. Consider extracting this into a helper method to improve maintainability and ensure consistency.
0f0e9f4 to
352afda
Compare
cb37e30 to
0a51a22
Compare
c9687e7 to
4f32bc1
Compare
957e76a to
92b56de
Compare
92b56de to
be0d3b4
Compare
Same as #4039 but for multi part upload command
This change creates 3 event progress trackers for MultipartUploadCommand.
UploadInitiatedEvent,UploadedCompletedEvent, andUploadFailedEvent. This allows the user to subscribe to events like doing belowThese new events should only be fired 1 time during the entire lifecycle of the upload. The details of what each event should contain is in the SEP.
Some of the events (UploadCompleted) also have new
TranserUtilityUploadResponseobject as per the SEP requirements. This contains all of the common fields between the low levelPutObectResponseandCompleteMultipartUploadResponse.Just as an FYI will also eventually be returning
TransferUtilityUploadResponseobject to the user when we create the new apisUploadWithResponseAsyncAs per the SEP requirements, I have added unit tests using the mapping.json file from the SEP, which verify that all required fields in
CompleteMultipartUploadResponseare mapped toTransferUtilityUploadResponse.Description
Motivation and Context
This is being done as part of the SEP compliance.
Testing
Types of changes
Checklist
License