diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-20 21:09:17 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-20 21:09:17 +0000 |
commit | 68f1860e6f1f9e8441c434f4e62238c359ce8c7c (patch) | |
tree | d12eab92b88fdcd0bdcea4586ec5352898b16e6c /lib | |
parent | 1af0d38d9c5a88d7123283c714857dc4da991371 (diff) | |
download | gitlab-ce-68f1860e6f1f9e8441c434f4e62238c359ce8c7c.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/git_access_snippet.rb | 5 | ||||
-rw-r--r-- | lib/gitlab/sidekiq_cluster.rb | 10 | ||||
-rw-r--r-- | lib/gitlab/sidekiq_cluster/cli.rb | 4 |
3 files changed, 13 insertions, 6 deletions
diff --git a/lib/gitlab/git_access_snippet.rb b/lib/gitlab/git_access_snippet.rb index e11c1ea527c..3ba2fcecd6f 100644 --- a/lib/gitlab/git_access_snippet.rb +++ b/lib/gitlab/git_access_snippet.rb @@ -98,7 +98,10 @@ module Gitlab def check_single_change_access(change) Checks::SnippetCheck.new(change, logger: logger).validate! - Checks::PushFileCountCheck.new(change, repository: repository, limit: Snippet::MAX_FILE_COUNT, logger: logger).validate! + + if Feature.enabled?(:snippet_count_check) + Checks::PushFileCountCheck.new(change, repository: repository, limit: Snippet::MAX_FILE_COUNT, logger: logger).validate! + end rescue Checks::TimedLogger::TimeoutError raise TimeoutError, logger.full_message end diff --git a/lib/gitlab/sidekiq_cluster.rb b/lib/gitlab/sidekiq_cluster.rb index c19bef1389a..70df40fc35d 100644 --- a/lib/gitlab/sidekiq_cluster.rb +++ b/lib/gitlab/sidekiq_cluster.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require 'shellwords' + module Gitlab module SidekiqCluster # The signals that should terminate both the master and workers. @@ -73,9 +75,9 @@ module Gitlab counts = count_by_queue(queues) cmd = %w[bundle exec sidekiq] - cmd << "-c #{self.concurrency(queues, min_concurrency, max_concurrency)}" + cmd << "-c#{self.concurrency(queues, min_concurrency, max_concurrency)}" cmd << "-e#{env}" - cmd << "-gqueues: #{proc_details(counts)}" + cmd << "-gqueues:#{proc_details(counts)}" cmd << "-r#{directory}" counts.each do |queue, count| @@ -83,7 +85,7 @@ module Gitlab end if dryrun - puts "Sidekiq command: #{cmd}" # rubocop:disable Rails/Output + puts Shellwords.join(cmd) # rubocop:disable Rails/Output return end @@ -112,7 +114,7 @@ module Gitlab else "#{queue} (#{count})" end - end.join(', ') + end.join(',') end def self.concurrency(queues, min_concurrency, max_concurrency) diff --git a/lib/gitlab/sidekiq_cluster/cli.rb b/lib/gitlab/sidekiq_cluster/cli.rb index 0a9624950c2..245d918e382 100644 --- a/lib/gitlab/sidekiq_cluster/cli.rb +++ b/lib/gitlab/sidekiq_cluster/cli.rb @@ -64,7 +64,9 @@ module Gitlab 'No queues found, you must select at least one queue' end - @logger.info("Starting cluster with #{queue_groups.length} processes") + unless @dryrun + @logger.info("Starting cluster with #{queue_groups.length} processes") + end @processes = SidekiqCluster.start( queue_groups, |