Commit daa046ec authored by Vitali Tatarintev's avatar Vitali Tatarintev

Merge branch 'ci-plan-needs-size-default-on' into 'master'

Enable `ci_plan_needs_size_limit` feature flag

See merge request gitlab-org/gitlab!39678
parents 08482bc4 6f9357e0
---
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
......@@ -1989,9 +1989,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 ten. 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-core-only).
- For self-managed instances, the limit is: 50. This limit [can be changed](#changing-the-needs-job-limit-core-only).
- 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,
......@@ -2002,18 +2000,10 @@ This example creates four paths of execution:
##### Changing the `needs:` job limit **(CORE ONLY)**
The maximum number of jobs that can be defined within `needs:` defaults to 10.
The maximum number of jobs that can be defined within `needs:` defaults to 50.
To change this limit to 50 on a self-managed installation, a GitLab administrator
with [access to the GitLab Rails console](../../administration/feature_flags.md)
can enable the `:ci_plan_needs_size_limit` feature flag:
```ruby
Feature::enable(:ci_plan_needs_size_limit)
```
After the feature flag is enabled, you can choose a custom limit. For example, to
set the limit to 100:
A GitLab administrator with [access to the GitLab Rails console](../../administration/feature_flags.md)
can choose a custom limit. For example, to set the limit to 100:
```ruby
Plan.default.actual_limits.update!(ci_needs_size_limit: 100)
......
......@@ -65,7 +65,7 @@ module Gitlab
end
def self.ci_plan_needs_size_limit?(project)
::Feature.enabled?(:ci_plan_needs_size_limit, project)
::Feature.enabled?(:ci_plan_needs_size_limit, project, default_enabled: true)
end
def self.job_entry_matches_all_keys?
......
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