Commit b5be11f7 authored by Maxime Orefice's avatar Maxime Orefice

Remove ci_preload_runner_tags feature flag

Changelog: performance
parent 802314d3
......@@ -381,8 +381,6 @@ module Ci
end
def tag_list
return super unless Feature.enabled?(:ci_preload_runner_tags, default_enabled: :yaml)
if tags.loaded?
tags.map(&:name)
else
......
......@@ -100,7 +100,7 @@ module Ci
def tick_for(build, runners)
runners = runners.with_recent_runner_queue
runners = runners.with_tags if Feature.enabled?(:ci_preload_runner_tags, default_enabled: :yaml)
runners = runners.with_tags
metrics.observe_active_runners(-> { runners.to_a.size })
......
---
name: ci_preload_runner_tags
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/55543
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/323243
milestone: '13.10'
type: development
group: group::memory
default_enabled: true
......@@ -308,36 +308,12 @@ RSpec.describe Ci::UpdateBuildQueueService do
let!(:build) { create(:ci_build, pipeline: pipeline, tag_list: %w[a b]) }
let!(:project_runner) { create(:ci_runner, :project, :online, projects: [project], tag_list: %w[a b c]) }
context 'when ci_preload_runner_tags is enabled' do
before do
stub_feature_flags(
ci_preload_runner_tags: true
)
end
it 'does execute the same amount of queries regardless of number of runners' do
control_count = ActiveRecord::QueryRecorder.new { subject.tick(build) }.count
create_list(:ci_runner, 10, :project, :online, projects: [project], tag_list: %w[b c d])
expect { subject.tick(build) }.not_to exceed_all_query_limit(control_count)
end
end
context 'when ci_preload_runner_tags are disabled' do
before do
stub_feature_flags(
ci_preload_runner_tags: false
)
end
it 'does execute more queries for more runners' do
control_count = ActiveRecord::QueryRecorder.new { subject.tick(build) }.count
it 'does execute the same amount of queries regardless of number of runners' do
control_count = ActiveRecord::QueryRecorder.new { subject.tick(build) }.count
create_list(:ci_runner, 10, :project, :online, projects: [project], tag_list: %w[b c d])
create_list(:ci_runner, 10, :project, :online, projects: [project], tag_list: %w[b c d])
expect { subject.tick(build) }.to exceed_all_query_limit(control_count)
end
expect { subject.tick(build) }.not_to exceed_all_query_limit(control_count)
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