Commit cba9eeb6 authored by Kamil Trzciński's avatar Kamil Trzciński

Fix legacy_stages

parent bb5193bd
...@@ -407,11 +407,10 @@ module Ci ...@@ -407,11 +407,10 @@ module Ci
def legacy_stages_using_composite_status def legacy_stages_using_composite_status
stages = statuses.latest stages = statuses.latest
.group_by(&:stage_idx) .order(:stage_idx, :stage)
.sort_by(&:first) .group_by(&:stage)
stages.map do |stage_idx, jobs| stages.map do |stage_name, jobs|
stage_name = jobs.first.stage
jobs_statuses = jobs.pluck(:status, :allow_failure) jobs_statuses = jobs.pluck(:status, :allow_failure)
composite_status = Gitlab::Ci::Status::Composite composite_status = Gitlab::Ci::Status::Composite
......
...@@ -73,7 +73,7 @@ module Gitlab ...@@ -73,7 +73,7 @@ module Gitlab
def only_of?(*names) def only_of?(*names)
matching = names.count { |name| @status_set.include?(name) } matching = names.count { |name| @status_set.include?(name) }
matching > 0 && \ matching > 0 &&
matching == @status_set.size matching == @status_set.size
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