On a site where backups and uploads to Google buckets was working, the backup page now says:
Failed to access backup storage: A header or query you provided requested a function that is not implemented.
I thought that it might be a bucket permissions issue (but that didn’t really make sense because the same configuration was working a couple weeks ago), but re-reading that message, it sounds like somehow Discourse is trying to do something that’s, uh, not implemented. (Which also seems far-fetched).
S3 uploads to a Google bucket (albeit a different one) are working just fine. There is a production site on 2.4.0.beta9 and a staging site running 2.4.0.beta10 (and I just did another upgrade on the staging site).
It’s a standard 2-container install with only standard plugins and the S3 settings configured with env: in the .yml file. EDIT: I deleted those ENV settings from yml and rebuilt (destroy, start didn’t remove them) and the issue remains.
I don’t see any obvious (to me) commits that could be related.
EDIT: There is yet another standard install instance running 2.4.0.beta8 with the same settings and it’s working, so it appears that something happened between beta8 and beta9. This does seem like a . @gerhard could this somehow be related to your backup changes?
P.S. I checked a site using DigitalOcean Spaces and it’s working fine for backups.
Are you getting the error as soon as you visit /admin/backups? I didn’t change anything in that area recently, but we updated the aws-s3 gem between beta8 and beta10 from version 1.36.1 to 1.60.1. It’s possible that this doesn’t work with Google buckets anymore. Maybe you find the cause in the CHANGELOG. You could test with different versions of the gem to narrow it down.
So, by entering the container and editing Gemfile and changing
gem 'aws-sdk-s3', require: false
to versions of
gem 'aws-sdk-s3', '1.51.0', require: false
and then doing
bundle install --no-deployment
sv restart unicorn
to see if it worked or not, a binary search through the versions shows that 1.51.0 is the last version that works, so something in 1.52.0 “Feature - Adding support in SelectObjectContent for scanning a portion of an object specified by a scan range.” is where the problem began.
I’m not sure what to do next. I guess I’ll open an issue over at https://github.com/aws/aws-sdk-ruby, but I’m not sure that they care, right? So maybe open a ticket with the Google?
And Discourse still works for uploads on Google Buckets, just not backups.