-
Notifications
You must be signed in to change notification settings - Fork 788
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
[bugfix]: Optional check for encryption in s3op response #1460
Conversation
metaflow/plugins/datatools/s3/s3.py
Outdated
@@ -759,7 +759,9 @@ def _info(s3, tmp): | |||
"metadata": resp["Metadata"], | |||
"size": resp["ContentLength"], | |||
"last_modified": get_timestamp(resp["LastModified"]), | |||
"encryption": resp["ServerSideEncryption"], | |||
"encryption": resp["ServerSideEncryption"] |
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.
can you do resp.get("ServerSideEncryption")
instead?
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.
Can you also add a comment here re: why ServerSideEncryption
might be missing and under what circumstances?
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.
Done.
Complete oversight on my part while testing the original feature. Now verified that this fixes the issue with MinIO. |
Hey, I'm getting an exception here when working with moto S3 mocking server, seems like this should be changed to |
Thank you for the report, this should now be fixed with the latest 2.9.9 release. |
Introduction of s3 encryption #1436 broke support for MiniO since MiniO doesn't have a
ServerSideEncryption
key in its response payload. This PR will only set encryption from the response ifServerSideEncryption
is present in the payload.