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
b1a668fb
Commit
b1a668fb
authored
Nov 30, 2021
by
Pedro Pombeiro
Committed by
Kerri Miller
Nov 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ci_runner_limits_override feature flag
parent
574144e1
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
17 additions
and
101 deletions
+17
-101
app/models/ci/runner_namespace.rb
app/models/ci/runner_namespace.rb
+0
-1
app/models/ci/runner_project.rb
app/models/ci/runner_project.rb
+0
-1
config/feature_flags/development/ci_runner_limits_override.yml
...g/feature_flags/development/ci_runner_limits_override.yml
+0
-8
doc/administration/instance_limits.md
doc/administration/instance_limits.md
+2
-2
spec/models/ci/runner_namespace_spec.rb
spec/models/ci/runner_namespace_spec.rb
+0
-6
spec/models/ci/runner_project_spec.rb
spec/models/ci/runner_project_spec.rb
+0
-6
spec/requests/api/ci/runner/runners_post_spec.rb
spec/requests/api/ci/runner/runners_post_spec.rb
+10
-54
spec/requests/api/ci/runners_spec.rb
spec/requests/api/ci/runners_spec.rb
+5
-23
No files found.
app/models/ci/runner_namespace.rb
View file @
b1a668fb
...
@@ -7,7 +7,6 @@ module Ci
...
@@ -7,7 +7,6 @@ module Ci
self
.
limit_name
=
'ci_registered_group_runners'
self
.
limit_name
=
'ci_registered_group_runners'
self
.
limit_scope
=
:group
self
.
limit_scope
=
:group
self
.
limit_relation
=
:recent_runners
self
.
limit_relation
=
:recent_runners
self
.
limit_feature_flag_for_override
=
:ci_runner_limits_override
belongs_to
:runner
,
inverse_of: :runner_namespaces
belongs_to
:runner
,
inverse_of: :runner_namespaces
belongs_to
:namespace
,
inverse_of: :runner_namespaces
,
class_name:
'::Namespace'
belongs_to
:namespace
,
inverse_of: :runner_namespaces
,
class_name:
'::Namespace'
...
...
app/models/ci/runner_project.rb
View file @
b1a668fb
...
@@ -7,7 +7,6 @@ module Ci
...
@@ -7,7 +7,6 @@ module Ci
self
.
limit_name
=
'ci_registered_project_runners'
self
.
limit_name
=
'ci_registered_project_runners'
self
.
limit_scope
=
:project
self
.
limit_scope
=
:project
self
.
limit_relation
=
:recent_runners
self
.
limit_relation
=
:recent_runners
self
.
limit_feature_flag_for_override
=
:ci_runner_limits_override
belongs_to
:runner
,
inverse_of: :runner_projects
belongs_to
:runner
,
inverse_of: :runner_projects
belongs_to
:project
,
inverse_of: :runner_projects
belongs_to
:project
,
inverse_of: :runner_projects
...
...
config/feature_flags/development/ci_runner_limits_override.yml
deleted
100644 → 0
View file @
574144e1
---
name
:
ci_runner_limits_override
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67152
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/337224
milestone
:
'
14.2'
type
:
development
group
:
group::runner
default_enabled
:
false
doc/administration/instance_limits.md
View file @
b1a668fb
...
@@ -551,8 +551,8 @@ Plan.default.actual_limits.update!(pages_file_entries: 100)
...
@@ -551,8 +551,8 @@ Plan.default.actual_limits.update!(pages_file_entries: 100)
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/321368) in GitLab 13.12. Disabled by default.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/321368) in GitLab 13.12. Disabled by default.
> - Enabled on GitLab.com in GitLab 14.3.
> - Enabled on GitLab.com in GitLab 14.3.
> - Enabled on self-managed in GitLab 14.4.
> - Enabled on self-managed in GitLab 14.4.
> - Feature flag `ci_runner_limits` removed in GitLab 14.4.
You can still use `ci_runner_limits_override`
> - Feature flag `ci_runner_limits` removed in GitLab 14.4.
to remove limits for a given scope
.
> - Feature flag `ci_runner_limits_override` removed in GitLab 14.6
.
The total number of registered runners is limited at the group and project levels. Each time a new runner is registered,
The total number of registered runners is limited at the group and project levels. Each time a new runner is registered,
GitLab checks these limits against runners that have been active in the last 3 months.
GitLab checks these limits against runners that have been active in the last 3 months.
...
...
spec/models/ci/runner_namespace_spec.rb
View file @
b1a668fb
...
@@ -4,12 +4,6 @@ require 'spec_helper'
...
@@ -4,12 +4,6 @@ require 'spec_helper'
RSpec
.
describe
Ci
::
RunnerNamespace
do
RSpec
.
describe
Ci
::
RunnerNamespace
do
it_behaves_like
'includes Limitable concern'
do
it_behaves_like
'includes Limitable concern'
do
before
do
skip_default_enabled_yaml_check
stub_feature_flags
(
ci_runner_limits_override:
false
)
end
subject
{
build
(
:ci_runner_namespace
,
group:
create
(
:group
,
:nested
),
runner:
create
(
:ci_runner
,
:group
))
}
subject
{
build
(
:ci_runner_namespace
,
group:
create
(
:group
,
:nested
),
runner:
create
(
:ci_runner
,
:group
))
}
end
end
end
end
spec/models/ci/runner_project_spec.rb
View file @
b1a668fb
...
@@ -4,12 +4,6 @@ require 'spec_helper'
...
@@ -4,12 +4,6 @@ require 'spec_helper'
RSpec
.
describe
Ci
::
RunnerProject
do
RSpec
.
describe
Ci
::
RunnerProject
do
it_behaves_like
'includes Limitable concern'
do
it_behaves_like
'includes Limitable concern'
do
before
do
skip_default_enabled_yaml_check
stub_feature_flags
(
ci_runner_limits_override:
false
)
end
subject
{
build
(
:ci_runner_project
,
project:
create
(
:project
),
runner:
create
(
:ci_runner
,
:project
))
}
subject
{
build
(
:ci_runner_project
,
project:
create
(
:project
),
runner:
create
(
:ci_runner
,
:project
))
}
end
end
end
end
spec/requests/api/ci/runner/runners_post_spec.rb
View file @
b1a668fb
...
@@ -98,33 +98,14 @@ RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state do
...
@@ -98,33 +98,14 @@ RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state do
before
do
before
do
create
(
:ci_runner
,
runner_type: :project_type
,
projects:
[
project
],
contacted_at:
1
.
second
.
ago
)
create
(
:ci_runner
,
runner_type: :project_type
,
projects:
[
project
],
contacted_at:
1
.
second
.
ago
)
create
(
:plan_limits
,
:default_plan
,
ci_registered_project_runners:
1
)
create
(
:plan_limits
,
:default_plan
,
ci_registered_project_runners:
1
)
skip_default_enabled_yaml_check
stub_feature_flags
(
ci_runner_limits_override:
ci_runner_limits_override
)
end
context
'with ci_runner_limits_override FF disabled'
do
let
(
:ci_runner_limits_override
)
{
false
}
it
'does not create runner'
do
request
expect
(
response
).
to
have_gitlab_http_status
(
:bad_request
)
expect
(
json_response
[
'message'
]).
to
include
(
'runner_projects.base'
=>
[
'Maximum number of ci registered project runners (1) exceeded'
])
expect
(
project
.
runners
.
reload
.
size
).
to
eq
(
1
)
end
end
end
context
'with ci_runner_limits_override FF enabled'
do
it
'does not create runner'
do
let
(
:ci_runner_limits_override
)
{
true
}
request
it
'creates runner'
do
request
expect
(
response
).
to
have_gitlab_http_status
(
:created
)
expect
(
response
).
to
have_gitlab_http_status
(
:bad_request
)
expect
(
json_response
[
'message'
]).
to
be_nil
expect
(
json_response
[
'message'
]).
to
include
(
'runner_projects.base'
=>
[
'Maximum number of ci registered project runners (1) exceeded'
])
expect
(
project
.
runners
.
reload
.
size
).
to
eq
(
2
)
expect
(
project
.
runners
.
reload
.
size
).
to
eq
(
1
)
end
end
end
end
end
...
@@ -132,9 +113,6 @@ RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state do
...
@@ -132,9 +113,6 @@ RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state do
before
do
before
do
create
(
:ci_runner
,
runner_type: :project_type
,
projects:
[
project
],
created_at:
14
.
months
.
ago
,
contacted_at:
13
.
months
.
ago
)
create
(
:ci_runner
,
runner_type: :project_type
,
projects:
[
project
],
created_at:
14
.
months
.
ago
,
contacted_at:
13
.
months
.
ago
)
create
(
:plan_limits
,
:default_plan
,
ci_registered_project_runners:
1
)
create
(
:plan_limits
,
:default_plan
,
ci_registered_project_runners:
1
)
skip_default_enabled_yaml_check
stub_feature_flags
(
ci_runner_limits_override:
false
)
end
end
it
'creates runner'
do
it
'creates runner'
do
...
@@ -204,33 +182,14 @@ RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state do
...
@@ -204,33 +182,14 @@ RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state do
before
do
before
do
create
(
:ci_runner
,
runner_type: :group_type
,
groups:
[
group
],
contacted_at:
nil
,
created_at:
1
.
month
.
ago
)
create
(
:ci_runner
,
runner_type: :group_type
,
groups:
[
group
],
contacted_at:
nil
,
created_at:
1
.
month
.
ago
)
create
(
:plan_limits
,
:default_plan
,
ci_registered_group_runners:
1
)
create
(
:plan_limits
,
:default_plan
,
ci_registered_group_runners:
1
)
skip_default_enabled_yaml_check
stub_feature_flags
(
ci_runner_limits_override:
ci_runner_limits_override
)
end
context
'with ci_runner_limits_override FF disabled'
do
let
(
:ci_runner_limits_override
)
{
false
}
it
'does not create runner'
do
request
expect
(
response
).
to
have_gitlab_http_status
(
:bad_request
)
expect
(
json_response
[
'message'
]).
to
include
(
'runner_namespaces.base'
=>
[
'Maximum number of ci registered group runners (1) exceeded'
])
expect
(
group
.
runners
.
reload
.
size
).
to
eq
(
1
)
end
end
end
context
'with ci_runner_limits_override FF enabled'
do
it
'does not create runner'
do
let
(
:ci_runner_limits_override
)
{
true
}
request
it
'creates runner'
do
request
expect
(
response
).
to
have_gitlab_http_status
(
:created
)
expect
(
response
).
to
have_gitlab_http_status
(
:bad_request
)
expect
(
json_response
[
'message'
]).
to
be_nil
expect
(
json_response
[
'message'
]).
to
include
(
'runner_namespaces.base'
=>
[
'Maximum number of ci registered group runners (1) exceeded'
])
expect
(
group
.
runners
.
reload
.
size
).
to
eq
(
2
)
expect
(
group
.
runners
.
reload
.
size
).
to
eq
(
1
)
end
end
end
end
end
...
@@ -239,9 +198,6 @@ RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state do
...
@@ -239,9 +198,6 @@ RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state do
create
(
:ci_runner
,
runner_type: :group_type
,
groups:
[
group
],
created_at:
4
.
months
.
ago
,
contacted_at:
3
.
months
.
ago
)
create
(
:ci_runner
,
runner_type: :group_type
,
groups:
[
group
],
created_at:
4
.
months
.
ago
,
contacted_at:
3
.
months
.
ago
)
create
(
:ci_runner
,
runner_type: :group_type
,
groups:
[
group
],
contacted_at:
nil
,
created_at:
4
.
months
.
ago
)
create
(
:ci_runner
,
runner_type: :group_type
,
groups:
[
group
],
contacted_at:
nil
,
created_at:
4
.
months
.
ago
)
create
(
:plan_limits
,
:default_plan
,
ci_registered_group_runners:
1
)
create
(
:plan_limits
,
:default_plan
,
ci_registered_group_runners:
1
)
skip_default_enabled_yaml_check
stub_feature_flags
(
ci_runner_limits_override:
false
)
end
end
it
'creates runner'
do
it
'creates runner'
do
...
...
spec/requests/api/ci/runners_spec.rb
View file @
b1a668fb
...
@@ -1101,31 +1101,13 @@ RSpec.describe API::Ci::Runners do
...
@@ -1101,31 +1101,13 @@ RSpec.describe API::Ci::Runners do
context
'when it exceeds the application limits'
do
context
'when it exceeds the application limits'
do
before
do
before
do
create
(
:plan_limits
,
:default_plan
,
ci_registered_project_runners:
1
)
create
(
:plan_limits
,
:default_plan
,
ci_registered_project_runners:
1
)
skip_default_enabled_yaml_check
stub_feature_flags
(
ci_runner_limits_override:
ci_runner_limits_override
)
end
end
context
'with ci_runner_limits_override FF disabled'
do
it
'does not enable specific runner'
do
let
(
:ci_runner_limits_override
)
{
false
}
expect
do
post
api
(
"/projects/
#{
project
.
id
}
/runners"
,
admin
),
params:
{
runner_id:
new_project_runner
.
id
}
it
'does not enable specific runner'
do
end
.
not_to
change
{
project
.
runners
.
count
}
expect
do
expect
(
response
).
to
have_gitlab_http_status
(
:bad_request
)
post
api
(
"/projects/
#{
project
.
id
}
/runners"
,
admin
),
params:
{
runner_id:
new_project_runner
.
id
}
end
.
not_to
change
{
project
.
runners
.
count
}
expect
(
response
).
to
have_gitlab_http_status
(
:bad_request
)
end
end
context
'with ci_runner_limits_override FF enabled'
do
let
(
:ci_runner_limits_override
)
{
true
}
it
'enables specific runner'
do
expect
do
post
api
(
"/projects/
#{
project
.
id
}
/runners"
,
admin
),
params:
{
runner_id:
new_project_runner
.
id
}
end
.
to
change
{
project
.
runners
.
count
}
expect
(
response
).
to
have_gitlab_http_status
(
:created
)
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