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
bb253ec5
Commit
bb253ec5
authored
Nov 26, 2021
by
Marius Bobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove decoupling projects-runners feature flags
Changelog: other
parent
831b8720
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
87 deletions
+12
-87
app/services/ci/queue/build_queue_service.rb
app/services/ci/queue/build_queue_service.rb
+3
-5
app/services/ci/register_job_service.rb
app/services/ci/register_job_service.rb
+1
-8
config/feature_flags/development/ci_pending_builds_project_runners_decoupling.yml
...elopment/ci_pending_builds_project_runners_decoupling.yml
+0
-8
config/feature_flags/development/ci_queueing_builds_enabled_checks.yml
...e_flags/development/ci_queueing_builds_enabled_checks.yml
+0
-8
spec/services/ci/register_job_service_spec.rb
spec/services/ci/register_job_service_spec.rb
+8
-58
No files found.
app/services/ci/queue/build_queue_service.rb
View file @
bb253ec5
...
@@ -89,11 +89,9 @@ module Ci
...
@@ -89,11 +89,9 @@ module Ci
end
end
def
runner_projects_relation
def
runner_projects_relation
if
::
Feature
.
enabled?
(
:ci_pending_builds_project_runners_decoupling
,
runner
,
default_enabled: :yaml
)
runner
runner
.
runner_projects
.
select
(
'"ci_runner_projects"."project_id"::bigint'
)
.
runner_projects
else
.
select
(
'"ci_runner_projects"."project_id"::bigint'
)
runner
.
projects
.
without_deleted
.
with_builds_enabled
end
end
end
end
end
end
end
...
...
app/services/ci/register_job_service.rb
View file @
bb253ec5
...
@@ -269,14 +269,7 @@ module Ci
...
@@ -269,14 +269,7 @@ module Ci
{
{
missing_dependency_failure:
->
(
build
,
_
)
{
!
build
.
has_valid_build_dependencies?
},
missing_dependency_failure:
->
(
build
,
_
)
{
!
build
.
has_valid_build_dependencies?
},
runner_unsupported:
->
(
build
,
params
)
{
!
build
.
supported_runner?
(
params
.
dig
(
:info
,
:features
))
},
runner_unsupported:
->
(
build
,
params
)
{
!
build
.
supported_runner?
(
params
.
dig
(
:info
,
:features
))
},
archived_failure:
->
(
build
,
_
)
{
build
.
archived?
}
archived_failure:
->
(
build
,
_
)
{
build
.
archived?
},
}.
merge
(
builds_enabled_checks
)
end
def
builds_enabled_checks
return
{}
unless
::
Feature
.
enabled?
(
:ci_queueing_builds_enabled_checks
,
runner
,
default_enabled: :yaml
)
{
project_deleted:
->
(
build
,
_
)
{
build
.
project
.
pending_delete?
},
project_deleted:
->
(
build
,
_
)
{
build
.
project
.
pending_delete?
},
builds_disabled:
->
(
build
,
_
)
{
!
build
.
project
.
builds_enabled?
}
builds_disabled:
->
(
build
,
_
)
{
!
build
.
project
.
builds_enabled?
}
}
}
...
...
config/feature_flags/development/ci_pending_builds_project_runners_decoupling.yml
deleted
100644 → 0
View file @
831b8720
---
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
config/feature_flags/development/ci_queueing_builds_enabled_checks.yml
deleted
100644 → 0
View file @
831b8720
---
name
:
ci_queueing_builds_enabled_checks
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70581
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/341131
milestone
:
'
14.4'
type
:
development
group
:
group::pipeline execution
default_enabled
:
false
spec/services/ci/register_job_service_spec.rb
View file @
bb253ec5
...
@@ -87,36 +87,10 @@ module Ci
...
@@ -87,36 +87,10 @@ module Ci
end
end
context
'for specific runner'
do
context
'for specific runner'
do
context
'with tables decoupling disabled'
do
it
'does not pick a build'
do
before
do
expect
(
execute
(
specific_runner
)).
to
be_nil
stub_feature_flags
(
expect
(
pending_job
.
reload
).
to
be_failed
ci_pending_builds_project_runners_decoupling:
false
,
expect
(
pending_job
.
queuing_entry
).
to
be_nil
ci_queueing_builds_enabled_checks:
false
)
end
around
do
|
example
|
allow_cross_joins_across_databases
(
url:
'https://gitlab.com/gitlab-org/gitlab/-/issues/332952'
)
do
example
.
run
end
end
it
'does not pick a build'
do
expect
(
execute
(
specific_runner
)).
to
be_nil
end
end
context
'with tables decoupling enabled'
do
before
do
stub_feature_flags
(
ci_pending_builds_project_runners_decoupling:
true
,
ci_queueing_builds_enabled_checks:
true
)
end
it
'does not pick a build'
do
expect
(
execute
(
specific_runner
)).
to
be_nil
expect
(
pending_job
.
reload
).
to
be_failed
expect
(
pending_job
.
queuing_entry
).
to
be_nil
end
end
end
end
end
end
end
...
@@ -272,34 +246,10 @@ module Ci
...
@@ -272,34 +246,10 @@ module Ci
context
'and uses project runner'
do
context
'and uses project runner'
do
let
(
:build
)
{
execute
(
specific_runner
)
}
let
(
:build
)
{
execute
(
specific_runner
)
}
context
'with tables decoupling disabled'
do
it
'does not pick a build'
do
before
do
expect
(
build
).
to
be_nil
stub_feature_flags
(
expect
(
pending_job
.
reload
).
to
be_failed
ci_pending_builds_project_runners_decoupling:
false
,
expect
(
pending_job
.
queuing_entry
).
to
be_nil
ci_queueing_builds_enabled_checks:
false
)
end
around
do
|
example
|
allow_cross_joins_across_databases
(
url:
'https://gitlab.com/gitlab-org/gitlab/-/issues/332952'
)
do
example
.
run
end
end
it
{
expect
(
build
).
to
be_nil
}
end
context
'with tables decoupling enabled'
do
before
do
stub_feature_flags
(
ci_pending_builds_project_runners_decoupling:
true
,
ci_queueing_builds_enabled_checks:
true
)
end
it
'does not pick a build'
do
expect
(
build
).
to
be_nil
expect
(
pending_job
.
reload
).
to
be_failed
expect
(
pending_job
.
queuing_entry
).
to
be_nil
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