Commit 77d8e925 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'mo-remove-feature-flag-build-queue' into 'master'

Remove ci_register_job_service_one_by_one feature flag [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!64121
parents 6dd6b15b 564e6f22
......@@ -125,20 +125,12 @@ module Ci
builds = builds.queued_before(params[:job_age].seconds.ago)
end
if Feature.enabled?(:ci_register_job_service_one_by_one, runner, default_enabled: true)
build_ids = retrieve_queue(-> { builds.pluck(:id) })
build_ids = retrieve_queue(-> { builds.pluck(:id) })
@metrics.observe_queue_size(-> { build_ids.size }, @runner.runner_type)
@metrics.observe_queue_size(-> { build_ids.size }, @runner.runner_type)
build_ids.each do |build_id|
yield Ci::Build.find(build_id)
end
else
builds_array = retrieve_queue(-> { builds.to_a })
@metrics.observe_queue_size(-> { builds_array.size }, @runner.runner_type)
builds_array.each(&blk)
build_ids.each do |build_id|
yield Ci::Build.find(build_id)
end
end
# rubocop: enable CodeReuse/ActiveRecord
......
---
name: ci_register_job_service_one_by_one
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/55194
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/323177
milestone: '13.10'
type: development
group: group::memory
default_enabled: true
......@@ -711,11 +711,7 @@ module Ci
end
end
context 'when ci_register_job_service_one_by_one is enabled' do
before do
stub_feature_flags(ci_register_job_service_one_by_one: true)
end
context 'when a long queue is created' do
it 'picks builds one-by-one' do
expect(Ci::Build).to receive(:find).with(pending_job.id).and_call_original
......@@ -725,14 +721,6 @@ module Ci
include_examples 'handles runner assignment'
end
context 'when ci_register_job_service_one_by_one is disabled' do
before do
stub_feature_flags(ci_register_job_service_one_by_one: false)
end
include_examples 'handles runner assignment'
end
context 'when joining with pending builds table' do
before do
stub_feature_flags(ci_pending_builds_queue_join: true)
......
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