Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-10-08 15:11:10 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-10-08 15:11:10 +0300
commitaf97e4dd4beb0ba1aa0cb3c31df413333cbce77d (patch)
tree499b6ca6ce2881fe7c0449d680e1c45dbc4e26c0 /lib/gitlab/popen
parentd4c5231ca2df8cb4aa919c5bfa2dd570de32c0c3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/popen')
-rw-r--r--lib/gitlab/popen/runner.rb17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/gitlab/popen/runner.rb b/lib/gitlab/popen/runner.rb
index cd9ad270cd8..60c2082844c 100644
--- a/lib/gitlab/popen/runner.rb
+++ b/lib/gitlab/popen/runner.rb
@@ -31,7 +31,7 @@ module Gitlab
end
def all_stderr_empty?
- results.all? { |result| result.stderr.empty? }
+ results.all? { |result| stderr_empty_ignoring_spring(result) }
end
def failed_results
@@ -40,9 +40,22 @@ module Gitlab
def warned_results
results.select do |result|
- result.status.success? && !result.stderr.empty?
+ result.status.success? && !stderr_empty_ignoring_spring(result)
end
end
+
+ private
+
+ # NOTE: This is sometimes required instead of just calling `result.stderr.empty?`, if we
+ # want to ignore the spring "Running via Spring preloader..." output to STDERR.
+ # The `Spring.quiet=true` method which spring supports doesn't work, because it doesn't
+ # work to make it quiet when using spring binstubs (the STDERR is printed by `bin/spring`
+ # itself when first required, so there's no opportunity to set Spring.quiet=true).
+ # This should probably be opened as a bug against Spring, with a pull request to support a
+ # `SPRING_QUIET` env var as well.
+ def stderr_empty_ignoring_spring(result)
+ result.stderr.empty? || result.stderr =~ /\ARunning via Spring preloader in process [0-9]+\Z/
+ end
end
end
end