-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Upgrading from aws-sdk-s3 (1.176.1) to aws-sdk-s3 (1.178.0) breaks uploads to Cloudflare R2 #3174
Comments
I noticed the following recent commit regarding checksums: df86be6 |
Thanks for opening an issue. The AWS SDKs are intended to be used with AWS services and not 3rd party services. I am not sure of the internals of R2. The error seems to indicate you are calculating more than one checksum. Perhaps you should open an issue in ActiveStorage or R2 instead. You can try setting the client |
Thanks @mullermp, it was always a long shot but I thought I'd file the issue just in case there was an obvious answer. I appreciate the library is intended for S3, but there are many "S3 compatible" object stores which people are using with this gem. I'll see what Cloudflare say but for now I'll have to pin to the previous version which works completely fine. |
I understand. This was a deliberate decision from S3 (see #3166) and I was simply the monkey that wrote the code. |
Understood! Thank you for all you do!! 🙏 |
For anyone else struggling with this, pinning both |
I'm going to close this as there's no action from us. I believe the work around would be to set |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Has anyone found a solution for this? |
Looks like it got fixed permanently yesterday @collimarco |
@lylo Unfortunately no, it's not fixed for R2, I got the error today (a few hours ago) after upgrading this gem |
@collimarco I believe you can set these values |
Cloudflare have added a compatibility section at the top of their aws-sdk-ruby documentation. https://developers.cloudflare.com/r2/examples/aws/aws-sdk-ruby/ If you're using active storage, these can be set in the storage.yml configuration file for each bucket. |
@phil-6 what was the suggested compatibility fixes? I don't see anything like that in https://developers.cloudflare.com/r2/examples/aws/aws-sdk-ruby/ which seems to have been edited today |
Yeah, looks like they removed it, maybe it's not needed with their latest updates. 🤷 We added request_checksum_calculation: "when_required"
response_checksum_validation: "when_required" To the service configuration (in |
Describe the bug
I'm running Rails 8 and using aws-sdk-s3 to manage ActiveStorage uploads to Cloudflare R2. This has been working fine but if I upgrade to
v1.178.0
I am seeing the following error:Regression Issue
Expected Behavior
I expect the file to be uploaded to R2 without errors.
Current Behavior
The file is not uploaded to R2 and the aforementioned error is raised.
Reproduction Steps
I am using standard ActiveStorage configured to use Cloudflare R2.
Possible Solution
No response
Additional Information/Context
No response
Gem name ('aws-sdk', 'aws-sdk-resources' or service gems like 'aws-sdk-s3') and its version
aws-sdk-s3
Environment details (Version of Ruby, OS environment)
Ruby 3.4.1. macOS 15, Ubuntu 22.
The text was updated successfully, but these errors were encountered: