Commit 6f9357e0 authored by Kamil Trzciński's avatar Kamil Trzciński

Enable `ci_plan_needs_size_limit` feature flag

- Add feature flag definition
- Mark it as default enabled
parent 603bce88
---
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: ...@@ -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: - 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 - 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: 50. This limit [can be changed](#changing-the-needs-job-limit-core-only).
- 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).
- If `needs:` refers to a job that is marked as `parallel:`. - If `needs:` refers to a job that is marked as `parallel:`.
the current job will depend on all parallel jobs created. 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, - `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: ...@@ -2002,18 +2000,10 @@ This example creates four paths of execution:
##### Changing the `needs:` job limit **(CORE ONLY)** ##### 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 A GitLab administrator with [access to the GitLab Rails console](../../administration/feature_flags.md)
with [access to the GitLab Rails console](../../administration/feature_flags.md) can choose a custom limit. For example, to set the limit to 100:
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:
```ruby ```ruby
Plan.default.actual_limits.update!(ci_needs_size_limit: 100) Plan.default.actual_limits.update!(ci_needs_size_limit: 100)
......
...@@ -65,7 +65,7 @@ module Gitlab ...@@ -65,7 +65,7 @@ module Gitlab
end end
def self.ci_plan_needs_size_limit?(project) 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 end
def self.job_entry_matches_all_keys? 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