Skip to content

Conversation

@philasmar
Copy link
Contributor

@philasmar philasmar commented Oct 17, 2025

Description

Add missing fields for Upload and Download requests based on the S3 spec for the Transfer Utility.

Motivation and Context

Add missing fields for Upload and Download requests based on the S3 spec for the Transfer Utility.

Testing

Ran tests locally
Ran succesfull dry run

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed

License

  • I confirm that this pull request can be released under the Apache 2 license

@philasmar philasmar marked this pull request as draft October 17, 2025 17:06
Copy link
Contributor

@GarrettBeatty GarrettBeatty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i didnt look too closely at the individual fields and compare them to the mapping.json file but this seems to be on the correct path.

Also i think once youre ready to publish the final PR, if its possible to easily do

  1. 1 PR for the Download Changes
  2. 1 PR for the Upload Changes

Copy link
Contributor

@peterrsongg peterrsongg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have some minor comments

@philasmar philasmar force-pushed the asmarp/add-missing-fields branch 2 times, most recently from 7b82718 to 63497b4 Compare October 20, 2025 21:53
@philasmar philasmar marked this pull request as ready for review October 20, 2025 21:59
Copy link
Contributor

@GarrettBeatty GarrettBeatty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GarrettBeatty GarrettBeatty requested a review from Copilot October 20, 2025 22:22
Copy link
Contributor

Copilot AI left a 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 pull request adds missing fields to Transfer Utility request objects in the AWS S3 SDK to align with the S3 specification. The changes refactor the inheritance structure by moving common properties from derived classes to base classes (BaseUploadRequest and BaseDownloadRequest), and ensure that all required fields are properly propagated through the various upload/download command implementations.

Key changes:

  • Consolidated common upload properties into BaseUploadRequest base class
  • Added missing download-related properties to BaseDownloadRequest and TransferUtilityDownloadDirectoryRequest
  • Updated internal command classes to properly map newly added fields
  • Enhanced test infrastructure to validate request object completeness against S3 specifications
  • Added comprehensive test coverage for all request conversion paths

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
BaseUploadRequest.cs Added common upload properties (BucketName, ContentType, encryption settings, ACL, metadata, etc.)
BaseDownloadRequest.cs Added ExpectedBucketOwner, IfMatch, IfNoneMatch, and ResponseHeaderOverrides properties
TransferUtilityUploadRequest.cs Removed duplicate properties now inherited from BaseUploadRequest
TransferUtilityUploadDirectoryRequest.cs Removed duplicate properties now inherited from BaseUploadRequest
TransferUtilityDownloadDirectoryRequest.cs Added missing download-related properties
SimpleUploadCommand.cs Updated to map newly added fields to PutObjectRequest
MultipartUploadCommand.cs Updated to map fields across InitiateMultipartUpload, UploadPart, and CompleteMultipartUpload
UploadDirectoryCommand.cs Updated to propagate fields from directory request to individual file requests
DownloadDirectoryCommand.cs Updated to propagate fields to TransferUtilityDownloadRequest and ListObjects requests
BaseCommand.cs Updated ConvertToGetObjectRequest to map new download fields
HeadersCollection.cs Added ContentLanguage property
ResponseMapperTests.cs Enhanced test infrastructure to support nested property aliases and validate request completeness
property-aliases.json Extended with comprehensive property name mappings for all request types
9d07dc1e-d82d-4f94-8700-c7b57f87205d.json Added dev config for patch version bump

Copy link
Contributor

@peterrsongg peterrsongg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clarified comment on the annotation, and agree with garret on the testing

"ServerSideEncryption": "ServerSideEncryptionMethod",
"SSEKMSEncryptionContext": "ServerSideEncryptionKeyManagementServiceEncryptionContext",
"Restore": "RestoreExpiration"
"PutObjectResponse": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also update the mapping.json file in your PR (and rerun the tests to make sure we have everything)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will create a separate ticket to update the mapping.json once the change is merged. Also, a quick check showed that we need to do some updates on our end. Prefer to make that a separate task.

}

private AbortMultipartUploadRequest ConstructAbortMultipartUploadRequest(MultipartUpload upload)
internal AbortMultipartUploadRequest ConstructAbortMultipartUploadRequest(MultipartUpload upload)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a new SIM item/reminder to add a test case for this one. i see you have one for the other abort method but this one needs item too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do

@philasmar
Copy link
Contributor Author

Dry run passed

@philasmar philasmar merged commit 083d27b into feature/transfermanager Oct 21, 2025
1 check passed
@dscpinheiro dscpinheiro deleted the asmarp/add-missing-fields branch October 23, 2025 19:34
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.

3 participants