Commit c10f1a87 authored by Grzegorz Bizon's avatar Grzegorz Bizon Committed by Grzegorz Bizon

Revert "Merge branch 'fix/gb/ci-build-stuck-badge-performance-experiment' into 'master'"

This reverts merge request !50521
parent 3e96111d
......@@ -726,13 +726,7 @@ module Ci
end
def any_runners_online?
project.any_runners? do |runner|
if Feature.enabled?(:ci_build_stuck_badge_performance_experiment, project, type: :development, default_enabled: false)
runner.active? && runner.online?
else
runner.active? && runner.online? && runner.can_pick?(self)
end
end
project.any_runners? { |runner| runner.active? && runner.online? && runner.can_pick?(self) }
end
def stuck?
......
---
title: Add build stuck badge performance experiment
merge_request: 50521
author:
type: performance
---
name: ci_build_stuck_badge_performance_experiment
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50521
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/295490
milestone: '13.7'
type: development
group: group::continuous integration
default_enabled: false
......@@ -580,27 +580,9 @@ RSpec.describe Ci::Build do
is_expected.to be_falsey
end
context 'when runners are on-line but none can pick a build' do
before do
allow_any_instance_of(Ci::Runner)
.to receive(:can_pick?).and_return(false)
end
context 'when a performance experiement feature flag is enabled' do
before do
stub_feature_flags(ci_build_stuck_badge_performance_experiment: true)
end
it { is_expected.to be_truthy }
end
context 'when a performance experiment is not running' do
before do
stub_feature_flags(ci_build_stuck_badge_performance_experiment: false)
end
it { is_expected.to be_falsey }
end
it 'that cannot handle build' do
expect_any_instance_of(Ci::Runner).to receive(:can_pick?).and_return(false)
is_expected.to be_falsey
end
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