Commit 047a3c49 authored by Toon Claes's avatar Toon Claes

Merge branch 'sh-fix-ruby-2.7-deprecations-migration-helpers' into 'master'

Fix Ruby 2.7 deprecation warnings in migration helpers

See merge request gitlab-org/gitlab!42909
parents b6407994 eae8d62f
......@@ -176,7 +176,7 @@ module Gitlab
name: name.presence || concurrent_foreign_key_name(source, column)
}
if foreign_key_exists?(source, target, options)
if foreign_key_exists?(source, target, **options)
warning_message = "Foreign key not created because it exists already " \
"(this may be due to an aborted migration or similar): " \
"source: #{source}, target: #{target}, column: #{options[:column]}, "\
......@@ -330,13 +330,13 @@ module Gitlab
# * +timing_configuration+ - [[ActiveSupport::Duration, ActiveSupport::Duration], ...] lock timeout for the block, sleep time before the next iteration, defaults to `Gitlab::Database::WithLockRetries::DEFAULT_TIMING_CONFIGURATION`
# * +logger+ - [Gitlab::JsonLogger]
# * +env+ - [Hash] custom environment hash, see the example with `DISABLE_LOCK_RETRIES`
def with_lock_retries(**args, &block)
def with_lock_retries(*args, **kwargs, &block)
merged_args = {
klass: self.class,
logger: Gitlab::BackgroundMigration::Logger
}.merge(args)
}.merge(kwargs)
Gitlab::Database::WithLockRetries.new(merged_args).run(&block)
Gitlab::Database::WithLockRetries.new(**merged_args).run(&block)
end
def true_value
......
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