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
path: root/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-12 13:17:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-12 13:17:34 +0300
commit3a6238c2e23454c462ccd229b1802583e657bfd0 (patch)
tree808c1151b9916516e41cea4869791cbf3dab345f /lib
parentc301cf0ca5fbb998c22be5d8033e77be4bf0a451 (diff)
Add latest changes from gitlab-org/gitlab@14-9-stable-ee
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/database/migration_helpers.rb2
-rw-r--r--lib/gitlab/url_blocker.rb5
-rw-r--r--lib/tasks/gitlab/background_migrations.rake4
3 files changed, 6 insertions, 5 deletions
diff --git a/lib/gitlab/database/migration_helpers.rb b/lib/gitlab/database/migration_helpers.rb
index 63c031a6d0b..7602e09981a 100644
--- a/lib/gitlab/database/migration_helpers.rb
+++ b/lib/gitlab/database/migration_helpers.rb
@@ -961,7 +961,7 @@ module Gitlab
"\n\n" \
"Finalize it manualy by running" \
"\n\n" \
- "\tsudo gitlab-rake gitlab:background_migrations:finalize[#{job_class_name},#{table_name},#{column_name},'#{job_arguments.inspect.gsub(',', '\,')}']" \
+ "\tsudo gitlab-rake gitlab:background_migrations:finalize[#{job_class_name},#{table_name},#{column_name},'#{job_arguments.to_json.gsub(',', '\,')}']" \
"\n\n" \
"For more information, check the documentation" \
"\n\n" \
diff --git a/lib/gitlab/url_blocker.rb b/lib/gitlab/url_blocker.rb
index fe8c2227659..1e447923a39 100644
--- a/lib/gitlab/url_blocker.rb
+++ b/lib/gitlab/url_blocker.rb
@@ -289,9 +289,10 @@ module Gitlab
ObjectStoreSettings::SUPPORTED_TYPES.collect do |type|
section_setting = config.try(type)
- next unless section_setting
+ next unless section_setting && section_setting['enabled']
- object_store_setting = section_setting['object_store']
+ # Use #to_h to avoid Settingslogic bug: https://gitlab.com/gitlab-org/gitlab/-/issues/286873
+ object_store_setting = section_setting['object_store']&.to_h
next unless object_store_setting && object_store_setting['enabled']
diff --git a/lib/tasks/gitlab/background_migrations.rake b/lib/tasks/gitlab/background_migrations.rake
index 033427fa799..b1084495f3d 100644
--- a/lib/tasks/gitlab/background_migrations.rake
+++ b/lib/tasks/gitlab/background_migrations.rake
@@ -19,7 +19,7 @@ namespace :gitlab do
args[:job_class_name],
args[:table_name],
args[:column_name],
- Gitlab::Json.parse(args[:job_arguments]),
+ args[:job_arguments],
connection: main_model.connection
)
end
@@ -38,7 +38,7 @@ namespace :gitlab do
args[:job_class_name],
args[:table_name],
args[:column_name],
- Gitlab::Json.parse(args[:job_arguments]),
+ args[:job_arguments],
connection: model.connection
)
end