Skip to content
Snippets Groups Projects
Commit 6a12e9d1 authored by Kamil Trzcińśki's avatar Kamil Trzcińśki
Browse files

Merge branch 'sh-workaround-ruby-2-5-3-bug' into 'master'

Work around Ruby 2.5.3 crash when a CI job is selected

See merge request gitlab-org/gitlab-ce!23256
parents 25c71034 b53d3ac8
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -36,7 +36,7 @@ module Ci
builds = builds.with_any_tags
end
 
builds.find do |build|
selection = builds.find do |build|
next unless runner.can_pick?(build)
 
begin
Loading
Loading
@@ -45,7 +45,7 @@ module Ci
if assign_runner!(build, params)
register_success(build)
 
return Result.new(build, true) # rubocop:disable Cop/AvoidReturnFromBlocks
break build
end
rescue StateMachines::InvalidTransition, ActiveRecord::StaleObjectError
# We are looping to find another build that is not conflicting
Loading
Loading
@@ -61,6 +61,8 @@ module Ci
end
end
 
return Result.new(selection, true) if selection
register_failure
Result.new(nil, valid)
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment