diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-20 16:49:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-20 16:49:51 +0300 |
commit | 71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e (patch) | |
tree | 6a2d93ef3fb2d353bb7739e4b57e6541f51cdd71 /config/object_store_settings.rb | |
parent | a7253423e3403b8c08f8a161e5937e1488f5f407 (diff) |
Add latest changes from gitlab-org/gitlab@15-9-stable-eev15.9.0-rc42
Diffstat (limited to 'config/object_store_settings.rb')
-rw-r--r-- | config/object_store_settings.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/config/object_store_settings.rb b/config/object_store_settings.rb index 3fc24dab3d7..58d7ea22231 100644 --- a/config/object_store_settings.rb +++ b/config/object_store_settings.rb @@ -178,8 +178,12 @@ class ObjectStoreSettings # 1. The common settings are defined # 2. The legacy settings are not defined def use_consolidated_settings? - return false unless settings.dig('object_store', 'enabled') - return false unless settings.dig('object_store', 'connection').present? + # 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? WORKHORSE_ACCELERATED_TYPES.each do |store| # to_h is needed because we define `default` as a Gitaly storage name |