Commit 23a8677f authored by Stan Hu's avatar Stan Hu

Merge branch 'remove-puma-notices-from-admin-area-banner' into 'master'

Remove Puma notices from AdminArea banner

See merge request gitlab-org/gitlab!26137
parents 844752a6 12278035
---
title: Remove Puma notices from AdminArea banner
merge_request: 26137
author:
type: changed
......@@ -7,36 +7,14 @@ module Gitlab
extend Gitlab::Git::RuggedImpl::UseRugged
def check
return [] unless Gitlab::Runtime.puma?
notices = []
link_start = '<a href="https://docs.gitlab.com/ee/administration/operations/puma.html">'
link_end = '</a>'
notices << {
type: 'info',
message: _('You are running Puma, which is currently experimental. '\
'More information is available in our '\
'%{link_start}documentation%{link_end}.') % { link_start: link_start, link_end: link_end }
}
if running_puma_with_multiple_threads?
link_start = '<a href="https://docs.gitlab.com/ee/administration/operations/puma.html">'
link_end = '</a>'
notices << {
type: 'info',
message: _('Puma is running with a thread count above 1. '\
'Information on deprecated GitLab features in this configuration is available in the '\
'%{link_start}documentation%{link_end}.') % { link_start: link_start, link_end: link_end }
}
end
if running_puma_with_multiple_threads? && rugged_enabled_through_feature_flag?
link_start = '<a href="https://docs.gitlab.com/ee/administration/operations/puma.html#performance-caveat-when-using-puma-with-rugged">'
link_end = '</a>'
notices << {
type: 'warning',
message: _('Puma is running with a thread count above 1 and the rugged '\
message: _('Puma is running with a thread count above 1 and the Rugged '\
'service is enabled. This may decrease performance in some environments. '\
'See our %{link_start}documentation%{link_end} '\
'for details of this issue.') % { link_start: link_start, link_end: link_end }
......
......@@ -15735,10 +15735,7 @@ msgstr ""
msgid "Pull"
msgstr ""
msgid "Puma is running with a thread count above 1 and the rugged service is enabled. This may decrease performance in some environments. See our %{link_start}documentation%{link_end} for details of this issue."
msgstr ""
msgid "Puma is running with a thread count above 1. Information on deprecated GitLab features in this configuration is available in the %{link_start}documentation%{link_end}."
msgid "Puma is running with a thread count above 1 and the Rugged service is enabled. This may decrease performance in some environments. See our %{link_start}documentation%{link_end} for details of this issue."
msgstr ""
msgid "Purchase more minutes"
......@@ -22324,9 +22321,6 @@ msgstr ""
msgid "You are receiving this message because you are a GitLab administrator for %{url}."
msgstr ""
msgid "You are running Puma, which is currently experimental. More information is available in our %{link_start}documentation%{link_end}."
msgstr ""
msgid "You can %{linkStart}view the blob%{linkEnd} instead."
msgstr ""
......
......@@ -15,26 +15,10 @@ describe Gitlab::ConfigChecker::PumaRuggedChecker do
end
context 'application is puma' do
let(:notice_running_puma) do
{
type: 'info',
message: 'You are running Puma, which is currently experimental. '\
'More information is available in our '\
'<a href="https://docs.gitlab.com/ee/administration/operations/puma.html">documentation</a>.'
}
end
let(:notice_multi_threaded_puma) do
{
type: 'info',
message: 'Puma is running with a thread count above 1. '\
'Information on deprecated GitLab features in this configuration is available in the '\
'<a href="https://docs.gitlab.com/ee/administration/operations/puma.html">documentation</a>.'\
}
end
let(:notice_multi_threaded_puma_with_rugged) do
{
type: 'warning',
message: 'Puma is running with a thread count above 1 and the rugged '\
message: 'Puma is running with a thread count above 1 and the Rugged '\
'service is enabled. This may decrease performance in some environments. '\
'See our <a href="https://docs.gitlab.com/ee/administration/operations/puma.html#performance-caveat-when-using-puma-with-rugged">documentation</a> '\
'for details of this issue.'
......@@ -51,35 +35,29 @@ describe Gitlab::ConfigChecker::PumaRuggedChecker do
let(:multithreaded_puma) { false }
let(:rugged_enabled) { true }
it 'report running puma notice' do
is_expected.to contain_exactly(notice_running_puma)
end
it { is_expected.to be_empty }
end
context 'not multithreaded_puma and rugged API is not enabled' do
let(:multithreaded_puma) { false }
let(:rugged_enabled) { false }
it 'report running puma notice' do
is_expected.to contain_exactly(notice_running_puma)
end
it { is_expected.to be_empty }
end
context 'multithreaded_puma and rugged API is not enabled' do
let(:multithreaded_puma) { true }
let(:rugged_enabled) { false }
it 'report running puma notice and multi-thread puma notice' do
is_expected.to contain_exactly(notice_running_puma, notice_multi_threaded_puma)
end
it { is_expected.to be_empty }
end
context 'multithreaded_puma and rugged API is enabled' do
let(:multithreaded_puma) { true }
let(:rugged_enabled) { true }
it 'report puma/multi_threaded_puma/multi_threaded_puma_with_rugged notices' do
is_expected.to contain_exactly(notice_running_puma, notice_multi_threaded_puma, notice_multi_threaded_puma_with_rugged)
it 'report multi_threaded_puma_with_rugged notices' do
is_expected.to contain_exactly(notice_multi_threaded_puma_with_rugged)
end
end
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