Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b5be11f7
Commit
b5be11f7
authored
Jan 20, 2022
by
Maxime Orefice
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ci_preload_runner_tags feature flag
Changelog: performance
parent
802314d3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
39 deletions
+5
-39
app/models/ci/runner.rb
app/models/ci/runner.rb
+0
-2
app/services/ci/update_build_queue_service.rb
app/services/ci/update_build_queue_service.rb
+1
-1
config/feature_flags/development/ci_preload_runner_tags.yml
config/feature_flags/development/ci_preload_runner_tags.yml
+0
-8
spec/services/ci/update_build_queue_service_spec.rb
spec/services/ci/update_build_queue_service_spec.rb
+4
-28
No files found.
app/models/ci/runner.rb
View file @
b5be11f7
...
@@ -381,8 +381,6 @@ module Ci
...
@@ -381,8 +381,6 @@ module Ci
end
end
def
tag_list
def
tag_list
return
super
unless
Feature
.
enabled?
(
:ci_preload_runner_tags
,
default_enabled: :yaml
)
if
tags
.
loaded?
if
tags
.
loaded?
tags
.
map
(
&
:name
)
tags
.
map
(
&
:name
)
else
else
...
...
app/services/ci/update_build_queue_service.rb
View file @
b5be11f7
...
@@ -100,7 +100,7 @@ module Ci
...
@@ -100,7 +100,7 @@ module Ci
def
tick_for
(
build
,
runners
)
def
tick_for
(
build
,
runners
)
runners
=
runners
.
with_recent_runner_queue
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
})
metrics
.
observe_active_runners
(
->
{
runners
.
to_a
.
size
})
...
...
config/feature_flags/development/ci_preload_runner_tags.yml
deleted
100644 → 0
View file @
802314d3
---
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
spec/services/ci/update_build_queue_service_spec.rb
View file @
b5be11f7
...
@@ -308,36 +308,12 @@ RSpec.describe Ci::UpdateBuildQueueService do
...
@@ -308,36 +308,12 @@ RSpec.describe Ci::UpdateBuildQueueService do
let!
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
,
tag_list:
%w[a b]
)
}
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]
)
}
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
it
'does execute the same amount of queries regardless of number of runners'
do
before
do
control_count
=
ActiveRecord
::
QueryRecorder
.
new
{
subject
.
tick
(
build
)
}.
count
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
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
)
expect
{
subject
.
tick
(
build
)
}.
not_to
exceed_all_query_limit
(
control_count
)
end
end
end
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment