Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'config/object_store_settings.rb')
-rw-r--r--config/object_store_settings.rb22
1 files changed, 5 insertions, 17 deletions
diff --git a/config/object_store_settings.rb b/config/object_store_settings.rb
index 58d7ea22231..615b13d59ca 100644
--- a/config/object_store_settings.rb
+++ b/config/object_store_settings.rb
@@ -20,7 +20,7 @@ class ObjectStoreSettings
# Legacy parser
def self.legacy_parse(object_store, object_store_type)
- object_store ||= Settingslogic.new({})
+ object_store ||= GitlabSettings::Options.build({})
object_store['enabled'] = false if object_store['enabled'].nil?
object_store['remote_directory'], object_store['bucket_prefix'] = split_bucket_prefix(
object_store['remote_directory']
@@ -162,7 +162,7 @@ class ObjectStoreSettings
)
target_config['consolidated_settings'] = true
section['object_store'] = target_config
- # Settingslogic internally stores data as a Hash, but it also
+ # GitlabSettings::Options internally stores data as a Hash, but it also
# creates a Settings object for every key. To avoid confusion, we should
# update both so that Settings.artifacts and Settings['artifacts'] return
# the same result.
@@ -178,23 +178,11 @@ class ObjectStoreSettings
# 1. The common settings are defined
# 2. The legacy settings are not defined
def use_consolidated_settings?
- # to_h is needed because we define `default` as a Gitaly storage name
- # in stub_storage_settings. This causes Settingslogic to redefine Hash#default,
- # which causes Hash#dig to fail when the key doesn't exist: https://gitlab.com/gitlab-org/gitlab/-/issues/286873
- settings_h = settings.to_h
- return false unless settings_h.dig('object_store', 'enabled')
- return false unless settings_h.dig('object_store', 'connection').present?
+ return false unless settings.dig('object_store', 'enabled')
+ return false unless settings.dig('object_store', 'connection').present?
WORKHORSE_ACCELERATED_TYPES.each do |store|
- # to_h is needed because we define `default` as a Gitaly storage name
- # in stub_storage_settings. This causes Settingslogic to redefine Hash#default,
- # which causes Hash#dig to fail when the key doesn't exist: https://gitlab.com/gitlab-org/gitlab/-/issues/286873
- #
- # (byebug) section.dig
- # *** ArgumentError Exception: wrong number of arguments (given 0, expected 1+)
- # (byebug) section.dig('object_store')
- # *** ArgumentError Exception: wrong number of arguments (given 1, expected 0)
- section = settings.try(store)&.to_h
+ section = settings.try(store)
next unless section