Commit cc4f7ef4 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'sh-remove-deprecation-warnings-from-com' into 'master'

Conditionally enable deprecation log messages

Closes #46158 and gitlab-com/infrastructure#4228

See merge request gitlab-org/gitlab-ce!18997
parent b605916f
Pipeline #22217462 failed with stages
in 28 minutes and 41 seconds
deprecator = ActiveSupport::Deprecation.new('11.0', 'GitLab')
if Rails.env.development? || ENV['GITLAB_LEGACY_PATH_LOG_MESSAGE']
deprecator = ActiveSupport::Deprecation.new('11.0', 'GitLab')
deprecator.behavior = -> (message, callstack) {
Rails.logger.warn("#{message}: #{callstack[1..20].join}")
}
if Gitlab.dev_env_or_com?
ActiveSupport::Deprecation.deprecate_methods(Gitlab::GitalyClient::StorageSettings, :legacy_disk_path, deprecator: deprecator)
end
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