Skip to content

Fix path-style requests with Upload ARN functionality

Stan Hu requested to merge sh-fix-path-style-upload-arn into main

What does this MR do?

Previously only the hostname_immutable flag was set on the GoCloud URL for AWS when the upload ARN were used. This is not sufficent. As explained in https://github.com/google/go-cloud/issues/3472, we also need the use_path_style query parameter.

This should not affect most buckets because path-style access only works on buckets before September 2020 (https://aws.amazon.com/blogs/aws/amazon-s3-path-deprecation-plan-the-rest-of-the-story/). However, in the oft chance we have customers still using path-style access with S3 with the newly-introduced Upload ARN functionality, then this change will allow that to work.

Why was this MR needed?

I noticed the GoCloud URL wasn't completely correct in light of gitaly#6489 (closed) and https://github.com/google/go-cloud/issues/3472. In the interest of correctness, let's just make sure all the query parameters are right.

What's the best way to test this MR?

I don't have a great way of testing this since every bucket I have right now at my disposal was created after September 2020.

What are the relevant issue numbers?

Edited by Stan Hu

Merge request reports

Loading