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
207138f3
Commit
207138f3
authored
Sep 16, 2021
by
Marius Bobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature flag for controlling the rollout
Add feature flag for controlling the decoupling rollout
parent
04a2a993
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
1 deletion
+37
-1
app/services/ci/queue/build_queue_service.rb
app/services/ci/queue/build_queue_service.rb
+9
-1
config/feature_flags/development/ci_pending_builds_project_runners_decoupling.yml
...elopment/ci_pending_builds_project_runners_decoupling.yml
+8
-0
spec/services/ci/register_job_service_spec.rb
spec/services/ci/register_job_service_spec.rb
+20
-0
No files found.
app/services/ci/queue/build_queue_service.rb
View file @
207138f3
...
...
@@ -47,7 +47,7 @@ module Ci
def
builds_for_project_runner
relation
=
new_builds
.
where
(
project:
runner
.
runner_projects
.
select
(
:project_id
)
)
.
where
(
project:
runner
_projects_relation
)
order
(
relation
)
end
...
...
@@ -87,6 +87,14 @@ module Ci
end
end
end
def
runner_projects_relation
if
::
Feature
.
enabled?
(
:ci_pending_builds_project_runners_decoupling
,
runner
,
default_enabled: :yaml
)
runner
.
runner_projects
.
select
(
:project_id
)
else
runner
.
projects
.
without_deleted
.
with_builds_enabled
end
end
end
end
end
...
...
config/feature_flags/development/ci_pending_builds_project_runners_decoupling.yml
0 → 100644
View file @
207138f3
---
name
:
ci_pending_builds_project_runners_decoupling
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70415
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/341005
milestone
:
'
14.4'
type
:
development
group
:
group::pipeline execution
default_enabled
:
false
spec/services/ci/register_job_service_spec.rb
View file @
207138f3
...
...
@@ -79,6 +79,16 @@ module Ci
expect
(
execute
(
shared_runner
)).
to
be_nil
end
end
context
'for specific runner'
do
before
do
stub_feature_flags
(
ci_pending_builds_project_runners_decoupling:
false
)
end
it
'does not pick a build'
do
expect
(
execute
(
specific_runner
)).
to
be_nil
end
end
end
context
'allow shared runners'
do
...
...
@@ -228,6 +238,16 @@ module Ci
it
{
expect
(
build
).
to
be_nil
}
end
context
'and uses project runner'
do
before
do
stub_feature_flags
(
ci_pending_builds_project_runners_decoupling:
false
)
end
let
(
:build
)
{
execute
(
specific_runner
)
}
it
{
expect
(
build
).
to
be_nil
}
end
end
context
'allow group runners'
do
...
...
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