Commit 05a57af5 authored by Stan Hu's avatar Stan Hu

Revert multipart URL optimization for AWS S3

https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49482 omitted the
multipart upload URLs for Workhorse if the S3 client were used, but
Rails doesn't actually control whether Workhorse will use the S3
client. For example, previously if Workhorse detected a blank region, it
would not use the native client.

Since the multipart URLs were not available, Workhorse would attempt to
use the PutObject API for uploads, which might fail if chunked encodings
were used.

We now always include these multipart URLs to be safe.

Relates to https://gitlab.com/gitlab-org/gitlab-workhorse/-/issues/292
parent f433772f
---
title: Revert multipart URL optimization for AWS S3
merge_request: 52561
author:
type: fixed
......@@ -206,7 +206,7 @@ module ObjectStorage
end
def requires_multipart_upload?
config.aws? && !has_length && !use_workhorse_s3_client?
config.aws? && !has_length
end
def upload_id
......
......@@ -162,10 +162,6 @@ RSpec.describe ObjectStorage::DirectUpload do
it 'enables the Workhorse client' do
expect(subject[:UseWorkhorseClient]).to be true
end
it 'omits the multipart upload URLs' do
expect(subject).not_to include(:MultipartUpload)
end
end
context 'when only server side encryption is used' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment