From 0c922a0a151a3904fb0f18572be39c904b5c1ab6 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Sat, 3 Jul 2021 12:08:08 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .../development/use_workhorse_s3_client.yml | 8 -------- doc/administration/object_storage.md | 15 --------------- lib/object_storage/direct_upload.rb | 1 - spec/lib/object_storage/direct_upload_spec.rb | 10 ---------- 4 files changed, 34 deletions(-) delete mode 100644 config/feature_flags/development/use_workhorse_s3_client.yml diff --git a/config/feature_flags/development/use_workhorse_s3_client.yml b/config/feature_flags/development/use_workhorse_s3_client.yml deleted file mode 100644 index 3c34c420ebf..00000000000 --- a/config/feature_flags/development/use_workhorse_s3_client.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: use_workhorse_s3_client -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/35480 -rollout_issue_url: -milestone: '13.2' -type: development -group: group::source code -default_enabled: true diff --git a/doc/administration/object_storage.md b/doc/administration/object_storage.md index c2c32f059c9..525b41359cf 100644 --- a/doc/administration/object_storage.md +++ b/doc/administration/object_storage.md @@ -718,21 +718,6 @@ must be fulfilled: [ETag mismatch errors](#etag-mismatch) occur if server side encryption headers are used without enabling the Workhorse S3 client. -##### Disabling the feature - -The Workhorse S3 client is enabled by default when the -[`use_iam_profile` configuration option](#iam-permissions) is set to `true` or consolidated -object storage settings are configured. - -The feature can be disabled using the `:use_workhorse_s3_client` feature flag. To disable the -feature, ask a GitLab administrator with -[Rails console access](feature_flags.md#how-to-enable-and-disable-features-behind-flags) to run the -following command: - -```ruby -Feature.disable(:use_workhorse_s3_client) -``` - #### IAM Permissions To set up an instance profile: diff --git a/lib/object_storage/direct_upload.rb b/lib/object_storage/direct_upload.rb index 7fbf01f3768..3dd4e5e27d4 100644 --- a/lib/object_storage/direct_upload.rb +++ b/lib/object_storage/direct_upload.rb @@ -112,7 +112,6 @@ module ObjectStorage end def use_workhorse_s3_client? - return false unless Feature.enabled?(:use_workhorse_s3_client, default_enabled: true) return false unless config.use_iam_profile? || config.consolidated_settings? # The Golang AWS SDK does not support V2 signatures return false unless credentials.fetch(:aws_signature_version, 4).to_i >= 4 diff --git a/spec/lib/object_storage/direct_upload_spec.rb b/spec/lib/object_storage/direct_upload_spec.rb index 4b374452c0a..006f4f603b6 100644 --- a/spec/lib/object_storage/direct_upload_spec.rb +++ b/spec/lib/object_storage/direct_upload_spec.rb @@ -136,16 +136,6 @@ RSpec.describe ObjectStorage::DirectUpload do end end - context 'when feature flag is disabled' do - before do - stub_feature_flags(use_workhorse_s3_client: false) - end - - it 'does not enable Workhorse client' do - expect(subject[:UseWorkhorseClient]).to be false - end - end - context 'when V2 signatures are used' do before do credentials[:aws_signature_version] = 2