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
DM-41879: Implement S3 URL signing #73
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #73 +/- ##
==========================================
- Coverage 86.10% 86.10% -0.01%
==========================================
Files 27 27
Lines 4030 4065 +35
Branches 826 831 +5
==========================================
+ Hits 3470 3500 +30
- Misses 438 446 +8
+ Partials 122 119 -3 ☔ View full report in Codecov by Sentry. |
229593b
to
d657d99
Compare
9a11f9e
to
800032e
Compare
Added a new function for cleaning up the S3 environment before running tests. This replaces the two existing functions which had some problems: * 'clean_test_environment' wasn't clearing every environment variable that could affect the tests. * 'setAwsEnvCredentials' was hazardous because it could leave real credentials in place by accident, causing real infrastructure to be mutated.
Limit the parent directory creation in HttpResourcePath.write() to WebDAV endpoints only. Presigned S3 URLs do not have any way to check for existence of the parent directory. S3 has no concept of directories and even if it did, you wouldn't be able to do anything about them via a URL signed for the child.
800032e
to
da6e605
Compare
unittest.TestCase.enterContext() only became available in 3.11
da6e605
to
b2db37e
Compare
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.
Thanks for cleaning up the tests.
doc/changes/DM-41879.feature.rst
Outdated
@@ -0,0 +1 @@ | |||
Added functions to S3ResourcePath for generating presigned HTTP URLs |
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.
I think you have added a new API to ResourcePath
(say what it is) and there is only an implementation for S3.
Tim decided we should have a period of deprecation for these before removing them
87cc6b1
to
60ba628
Compare
Checklist
doc/changes