Skip to content
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 user provided SSE-C arguments to CompleteMultipartUpload call #274

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

nateprewitt
Copy link
Contributor

This PR will forward SSE-C arguments provided by the user to the final CompleteMultipartUpload call to handle cases where a policy has been defined which requires these for all PutObject calls.

This is to resolve a recently published workflow by S3 which changed the requiredness of these arguments due to PutObject being used under the hood for CompleteMultipartUpload.

Copy link
Contributor

@kyleknap kyleknap left a comment

Choose a reason for hiding this comment

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

Looks good. I just had a couple of comments

@@ -380,6 +380,12 @@ class MultipartUploader:
'RequestPayer',
]

COMPLETE_MULTIPART_ARGS = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh we do not need to update this module. This is module is no longer used in Boto3 and CLI. It was the old s3 logic that boto3 used before migrating over to the transfer manager interface. I think we should just make sure the transfer manager code path is updated to support this and not touch this module or it's tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, all of our upload tests that check this are currently written against this implementation 😬

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wrote a new test using the right infrastructure to make sure we've got this case covered.

'RequestPayer',
'ExpectedBucketOwner',
'SSECustomerKey',
'SSECustomerAlgorithm',
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to proxy over the SSECustomerKeyMD5 to the complete MPU as well? I noticed that it was in the upload parts list but not the complete mpu list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There was back and forth on this. They said only the Key/Algo for now. I've added what we know we need and we can always extend if there is further feedback. S3 has some knowledge gaps on the full feature scope, so we're meeting the known use case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added it for good measure. After some testing it doesn't have any impact on the call so we might as well be complete and pass it if it was provided.

@codecov-commenter
Copy link

codecov-commenter commented Sep 22, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.14% 🎉

Comparison is base (a90891c) 85.39% compared to head (96de9f0) 85.54%.
Report is 5 commits behind head on develop.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #274      +/-   ##
===========================================
+ Coverage    85.39%   85.54%   +0.14%     
===========================================
  Files           16       16              
  Lines         2719     2719              
===========================================
+ Hits          2322     2326       +4     
+ Misses         397      393       -4     
Files Changed Coverage Δ
s3transfer/copies.py 100.00% <100.00%> (ø)
s3transfer/upload.py 96.38% <100.00%> (ø)

... and 1 file with indirect coverage changes

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

Copy link
Contributor

@kyleknap kyleknap left a comment

Choose a reason for hiding this comment

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

Looks good 🚢

@nateprewitt nateprewitt merged commit 0fb0ba2 into develop Sep 25, 2023
27 checks passed
@nateprewitt nateprewitt deleted the SSEC_CMU branch September 25, 2023 15:52
aws-sdk-python-automation added a commit that referenced this pull request Sep 26, 2023
* release-0.7.0:
  Bumping version to 0.7.0
  Move change to feature instead of bugfix for backwards compatibility with botocore (#276)
  Add changelog for sse-c changes (#275)
  Add user provided SSE-C arguments to CompleteMultipartUpload call (#274)
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