Skip to content

Commit 3f3e645

Browse files
balasankarcstanhu
andcommitted
Merge branch 'sh-squelch-experimental-warnings-puma-sidekiq' into 'master'
Suppress Ruby experimental warning messages for Puma, Sidekiq See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7177 Merged-by: Balasankar 'Balu' C <[email protected]> Approved-by: Balasankar 'Balu' C <[email protected]> Co-authored-by: Stan Hu <[email protected]>
2 parents fe681c0 + 30688f3 commit 3f3e645

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

files/gitlab-cookbooks/gitlab/templates/default/sv-puma-run.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ exec 2>&1
55

66
<%= render("make_metrics_rundir.erb") %>
77
<%= render("mount_point_check.erb") %>
8+
rubyopt="-W:no-experimental"
89

910
exec chpst -P \
1011
-u <%= @options[:user] %>:<%= @options[:groupname] %> \
1112
-U <%= @options[:user] %>:<%= @options[:groupname] %> \
1213
-e /opt/gitlab/etc/gitlab-rails/env \
1314
/usr/bin/env \
15+
RUBYOPT="${rubyopt}" \
1416
prometheus_multiproc_dir="${prometheus_run_dir}" \
1517
ACTION_CABLE_WORKER_POOL_SIZE=<%= @options[:actioncable_worker_pool_size] %> \
1618
/opt/gitlab/embedded/bin/bundle exec puma -C <%= @options[:puma_rb] %>

files/gitlab-cookbooks/gitlab/templates/default/sv-sidekiq-run.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ cd <%= node['gitlab']['gitlab_rails']['dir'] %>/working
55
exec 2>&1
66
<%= render("make_metrics_rundir.erb", cookbook: 'gitlab') %>
77
<%= render("mount_point_check.erb", cookbook: 'gitlab') %>
8+
rubyopt="-W:no-experimental"
9+
810
exec chpst -e /opt/gitlab/etc/gitlab-rails/env -P \
911
-U <%= @options[:user] %>:<%= @options[:groupname] %> \
1012
-u <%= @options[:user] %>:<%= @options[:groupname] %> \
1113
/usr/bin/env \
14+
RUBYOPT="${rubyopt}" \
1215
prometheus_multiproc_dir="${prometheus_run_dir}" \
1316
/opt/gitlab/embedded/service/gitlab-rails/bin/sidekiq-cluster \
1417
-e <%= node['gitlab']['gitlab_rails']['environment'] %> \

spec/chef/cookbooks/gitlab/recipes/puma_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@
6060
expect(content).to match(/chmod 0700 \/run\/gitlab\/puma/)
6161
expect(content).to match(/chown git \/run\/gitlab\/puma/)
6262
expect(content).to match(/export prometheus_run_dir=\'\/run\/gitlab\/puma\'/)
63+
expect(content).to match(/rubyopt=\"-W:no-experimental\"/)
64+
expect(content).to include(%(RUBYOPT="${rubyopt}"))
6365
expect(content).to match(%r(/opt/gitlab/embedded/bin/bundle exec puma -C /var/opt/gitlab/gitlab-rails/etc/puma.rb))
6466
}
6567
end

spec/chef/cookbooks/gitlab/recipes/sidekiq_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
expect(content).to match(/chmod 0700 \/run\/gitlab\/sidekiq/)
2424
expect(content).to match(/chown git \/run\/gitlab\/sidekiq/)
2525
expect(content).to match(/export prometheus_run_dir=\'\/run\/gitlab\/sidekiq\'/)
26+
expect(content).to match(/rubyopt=\"-W:no-experimental\"/)
27+
expect(content).to include(%(RUBYOPT="${rubyopt}"))
2628
expect(content).to match(%r{bin/sidekiq-cluster})
2729
expect(content).to match(/-m 20/) # max_concurrency
2830
expect(content).to match(/--timeout 25/) # shutdown timeout

0 commit comments

Comments
 (0)