Commit 4f846b4f authored by Lukas 'Eipi' Eipert's avatar Lukas 'Eipi' Eipert Committed by Kamil Trzciński

Increase lower DAG `needs` limit from five to ten

If the feature flag `ci_dag_limit_needs` is turned on for a GitLab
instance, a job can now depend on up to ten jobs instead of five
parent dcc29451
---
title: Increase lower DAG `needs` limit from five to ten
merge_request: 21237
author:
type: changed
...@@ -2256,11 +2256,11 @@ This example creates three paths of execution: ...@@ -2256,11 +2256,11 @@ This example creates three paths of execution:
pipeline will be created with YAML error. pipeline will be created with YAML error.
- We are temporarily limiting the maximum number of jobs that a single job can - We are temporarily limiting the maximum number of jobs that a single job can
need in the `needs:` array: need in the `needs:` array:
- For GitLab.com, the limit is five. For more information, see our - For GitLab.com, the limit is ten. For more information, see our
[infrastructure issue](https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/7541). [infrastructure issue](https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/7541).
- For self-managed instances, the limit is: - For self-managed instances, the limit is:
- Five by default (`ci_dag_limit_needs` feature flag is enabled). - 10, if the `ci_dag_limit_needs` feature flag is enabled (default).
- 50 if the `ci_dag_limit_needs` feature flag is disabled. - 50, if the `ci_dag_limit_needs` feature flag is disabled.
- It is impossible for now to have `needs: []` (empty needs), the job always needs to - It is impossible for now to have `needs: []` (empty needs), the job always needs to
depend on something, unless this is the job in the first stage. However, support for depend on something, unless this is the job in the first stage. However, support for
an empty needs array [is planned](https://gitlab.com/gitlab-org/gitlab/issues/30631). an empty needs array [is planned](https://gitlab.com/gitlab-org/gitlab/issues/30631).
......
...@@ -10,7 +10,7 @@ module Gitlab ...@@ -10,7 +10,7 @@ module Gitlab
delegate :dig, to: :@seed_attributes delegate :dig, to: :@seed_attributes
# When the `ci_dag_limit_needs` is enabled it uses the lower limit # When the `ci_dag_limit_needs` is enabled it uses the lower limit
LOW_NEEDS_LIMIT = 5 LOW_NEEDS_LIMIT = 10
HARD_NEEDS_LIMIT = 50 HARD_NEEDS_LIMIT = 50
def initialize(pipeline, attributes, previous_stages) def initialize(pipeline, attributes, previous_stages)
......
...@@ -852,7 +852,7 @@ describe Gitlab::Ci::Pipeline::Seed::Build do ...@@ -852,7 +852,7 @@ describe Gitlab::Ci::Pipeline::Seed::Build do
it "returns an error" do it "returns an error" do
expect(subject.errors).to contain_exactly( expect(subject.errors).to contain_exactly(
"rspec: one job can only need 5 others, but you have listed 6. See needs keyword documentation for more details") "rspec: one job can only need 10 others, but you have listed 11. See needs keyword documentation for more details")
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment