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
710caac8
Commit
710caac8
authored
Sep 17, 2020
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove `ci_plan_needs_size_limit` feature flag
This makes 50 of DAG to be a current limit for all.
parent
4b82e445
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
49 deletions
+13
-49
config/feature_flags/development/ci_plan_needs_size_limit.yml
...ig/feature_flags/development/ci_plan_needs_size_limit.yml
+0
-7
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+1
-3
lib/gitlab/ci/features.rb
lib/gitlab/ci/features.rb
+0
-4
lib/gitlab/ci/pipeline/seed/build.rb
lib/gitlab/ci/pipeline/seed/build.rb
+1
-7
spec/lib/gitlab/ci/pipeline/seed/build_spec.rb
spec/lib/gitlab/ci/pipeline/seed/build_spec.rb
+11
-28
No files found.
config/feature_flags/development/ci_plan_needs_size_limit.yml
deleted
100644 → 0
View file @
4b82e445
---
name
:
ci_plan_needs_size_limit
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/37568
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/238173
group
:
group::ci
type
:
development
default_enabled
:
true
\ No newline at end of file
doc/ci/yaml/README.md
View file @
710caac8
...
...
@@ -2088,9 +2088,7 @@ This example creates four paths of execution:
-
The maximum number of jobs that a single job can need in the
`needs:`
array is limited:
-
For GitLab.com, the limit is 50. For more information, see our
[
infrastructure issue
](
https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/7541
)
.
-
For self-managed instances, the limit is:
-
10, if the
`ci_plan_needs_size_limit`
feature flag is disabled (default).
-
50, if the
`ci_plan_needs_size_limit`
feature flag is enabled. This limit
[
can be changed
](
#changing-the-needs-job-limit
)
.
-
For self-managed instances, the limit is: 50. This limit
[
can be changed
](
#changing-the-needs-job-limit
)
.
-
If
`needs:`
refers to a job that is marked as
`parallel:`
.
the current job will depend on all parallel jobs created.
-
`needs:`
is similar to
`dependencies:`
in that it needs to use jobs from prior stages,
...
...
lib/gitlab/ci/features.rb
View file @
710caac8
...
...
@@ -50,10 +50,6 @@ module Gitlab
::
Feature
.
enabled?
(
:ci_disallow_to_create_merge_request_pipelines_in_target_project
,
target_project
)
end
def
self
.
ci_plan_needs_size_limit?
(
project
)
::
Feature
.
enabled?
(
:ci_plan_needs_size_limit
,
project
,
default_enabled:
true
)
end
def
self
.
lint_creates_pipeline_with_dry_run?
(
project
)
::
Feature
.
enabled?
(
:ci_lint_creates_pipeline_with_dry_run
,
project
,
default_enabled:
true
)
end
...
...
lib/gitlab/ci/pipeline/seed/build.rb
View file @
710caac8
...
...
@@ -11,8 +11,6 @@ module Gitlab
delegate
:dig
,
to: :@seed_attributes
DEFAULT_NEEDS_LIMIT
=
10
def
initialize
(
pipeline
,
attributes
,
previous_stages
)
@pipeline
=
pipeline
@seed_attributes
=
attributes
...
...
@@ -140,11 +138,7 @@ module Gitlab
end
def
max_needs_allowed
if
::
Gitlab
::
Ci
::
Features
.
ci_plan_needs_size_limit?
(
@pipeline
.
project
)
@pipeline
.
project
.
actual_limits
.
ci_needs_size_limit
else
DEFAULT_NEEDS_LIMIT
end
@pipeline
.
project
.
actual_limits
.
ci_needs_size_limit
end
def
pipeline_attributes
...
...
spec/lib/gitlab/ci/pipeline/seed/build_spec.rb
View file @
710caac8
...
...
@@ -931,47 +931,30 @@ RSpec.describe Gitlab::Ci::Pipeline::Seed::Build do
context
'when using 101 needs'
do
let
(
:needs_count
)
{
101
}
context
'when ci_plan_needs_size_limit is disabled'
do
it
"returns an error"
do
expect
(
subject
.
errors
).
to
contain_exactly
(
"rspec: one job can only need 50 others, but you have listed 101. See needs keyword documentation for more details"
)
end
context
'when ci_needs_size_limit is set to 100'
do
before
do
stub_feature_flags
(
ci_plan_needs_size_limit:
false
)
project
.
actual_limits
.
update!
(
ci_needs_size_limit:
100
)
end
it
"returns an error"
do
expect
(
subject
.
errors
).
to
contain_exactly
(
"rspec: one job can only need 10 others, but you have listed 101. See needs keyword documentation for more details"
)
"rspec: one job can only need 10
0
others, but you have listed 101. See needs keyword documentation for more details"
)
end
end
context
'when ci_
plan_needs_size_limit is enabled
'
do
context
'when ci_
needs_size_limit is set to 0
'
do
before
do
stub_feature_flags
(
ci_plan_needs_size_limit:
true
)
project
.
actual_limits
.
update!
(
ci_needs_size_limit:
0
)
end
it
"returns an error"
do
expect
(
subject
.
errors
).
to
contain_exactly
(
"rspec: one job can only need 50 others, but you have listed 101. See needs keyword documentation for more details"
)
end
context
'when ci_needs_size_limit is set to 100'
do
before
do
project
.
actual_limits
.
update!
(
ci_needs_size_limit:
100
)
end
it
"returns an error"
do
expect
(
subject
.
errors
).
to
contain_exactly
(
"rspec: one job can only need 100 others, but you have listed 101. See needs keyword documentation for more details"
)
end
end
context
'when ci_needs_size_limit is set to 0'
do
before
do
project
.
actual_limits
.
update!
(
ci_needs_size_limit:
0
)
end
it
"returns an error"
do
expect
(
subject
.
errors
).
to
contain_exactly
(
"rspec: one job can only need 0 others, but you have listed 101. See needs keyword documentation for more details"
)
end
"rspec: one job can only need 0 others, but you have listed 101. See needs keyword documentation for more details"
)
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