-
Notifications
You must be signed in to change notification settings - Fork 22
fix(s3): remove ChecksumAlgorithm #603
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
Conversation
Looks like it was introduced in #588, thanks for catching all bugs related to on-prem S3 ! We might add some test suites with several S3 backends to catch this kind of issues |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #603 +/- ##
=======================================
Coverage 44.91% 44.92%
=======================================
Files 79 79
Lines 5762 5761 -1
=======================================
Hits 2588 2588
+ Misses 2959 2958 -1
Partials 215 215 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
You're welcome :) I was thinking about adding some unit tests around this but I have nothing easy right now 😄 To me, a mock would unlikely fit in such case. Wdyt? If that sounds like a plan, I can try to build the tests at some point 😄 |
Indeed, this bug was introduced with #588. To be honest I don't think the right fix is to check is the SHA256 algorithm is present with a fake object Put/Delete at each startup of the datastore... I checked in the code, turns out we don't really use the checksum of object storage backends in any way. In #588 I added the below lines because I wanted to make S3 on pair with GCS and Azure backends (which automatically provide MD5 checksums of objects, in my understanding): burrito/internal/datastore/storage/s3/s3.go Lines 91 to 96 in 765acea
But since in the datastore client we don't read this value and only return a boolean, I think we should remove completely the usage of the ChecksumAlgorithm parameter in the PutObjectInput structure: burrito/internal/datastore/storage/s3/s3.go Line 104 in 765acea
This will ease the implementation of the S3 backend and make it (I hope) universally compliant to multiple S3 implementations. WDYT @michael-todorovic @LucasMrqes ? I agree on the need to test Ceph and MinIO in ephemeral containers though 😄 |
With Terraform 1.11.2, they bumped the aws sdk which has the same exact feat and it broke with our ceph with the same log 😄 |
It seems like they're not planning to change anything anytime soon. I'll update this PR then :) |
8c38810
to
dad91be
Compare
Signed-off-by: Michael Todorovic <[email protected]>
Signed-off-by: Michael Todorovic <[email protected]>
dad91be
to
07c1f38
Compare
Fixes #602 by checking
ChecksumAlgorithmSha256
support on the s3 bucketThe check is made only on datastore startup