Skip to content
Snippets Groups Projects
Commit bf4debd4 authored by Avielle Wolfe's avatar Avielle Wolfe :three: Committed by Tiger Watson
Browse files

Raise default CI variable limits

Data gathering revealed that the maximum number of CI variables
currently used by projects and groups on gitlab.com is much higher than
we originally suspected. This commit raises the default variable limits
so that enforcing them on the backend will not be a breaking change

Changelog: changed
parent bdf96bb2
No related branches found
No related tags found
1 merge request!109861Raise default CI variable limits
# frozen_string_literal: true
class RaiseGroupAndProjectCiVariableLimits < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
restrict_gitlab_migration gitlab_schema: :gitlab_main
def up
create_or_update_plan_limit('project_ci_variables', 'default', 8000)
create_or_update_plan_limit('group_ci_variables', 'default', 30000)
end
def down
create_or_update_plan_limit('project_ci_variables', 'default', 200)
create_or_update_plan_limit('group_ci_variables', 'default', 200)
end
end
# frozen_string_literal: true
class RaiseCiVariablesDefaultLimits < Gitlab::Database::Migration[2.1]
def change
change_column_default(:plan_limits, :project_ci_variables, from: 200, to: 8000)
change_column_default(:plan_limits, :group_ci_variables, from: 200, to: 30000)
end
end
e11768af160039168f1badf070a8da705660f8a3518198570a0ad4fc39913d92
\ No newline at end of file
5acafd951bd7a1a521d2b82de5e4b2146e43dab401b3bae82b3d0bb5255c3373
\ No newline at end of file
......@@ -19660,8 +19660,8 @@ CREATE TABLE plan_limits (
security_policy_scan_execution_schedules integer DEFAULT 0 NOT NULL,
web_hook_calls_mid integer DEFAULT 0 NOT NULL,
web_hook_calls_low integer DEFAULT 0 NOT NULL,
project_ci_variables integer DEFAULT 200 NOT NULL,
group_ci_variables integer DEFAULT 200 NOT NULL,
project_ci_variables integer DEFAULT 8000 NOT NULL,
group_ci_variables integer DEFAULT 30000 NOT NULL,
ci_max_artifact_size_cyclonedx integer DEFAULT 1 NOT NULL,
rpm_max_file_size bigint DEFAULT '5368709120'::bigint NOT NULL,
ci_max_artifact_size_requirements_v2 integer DEFAULT 0 NOT NULL,
......@@ -124,7 +124,8 @@ all variables become available to the pipeline.
### For a project
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/362227) in GitLab 15.7, projects can define a maximum of 200 CI/CD variables.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/362227) in GitLab 15.7, projects can define a maximum of 200 CI/CD variables.
> - [Updated](https://gitlab.com/gitlab-org/gitlab/-/issues/373289) in GitLab 15.9, projects can define a maximum of 8000 CI/CD variables.
You can add CI/CD variables to a project's settings.
......@@ -153,6 +154,7 @@ or in [job scripts](#use-cicd-variables-in-job-scripts).
> - Support for environment scopes [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/2874) in GitLab Premium 13.11
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/362227) in GitLab 15.7, groups can define a maximum of 200 CI/CD variables.
> - [Updated](https://gitlab.com/gitlab-org/gitlab/-/issues/373289) in GitLab 15.9, groups can define a maximum of 30000 CI/CD variables.
You can make a CI/CD variable available to all projects in a group.
......
......@@ -47,7 +47,7 @@
post_graphql(query, current_user: user)
expect(graphql_data.dig('group', 'ciVariables', 'limit')).to be(200)
expect(graphql_data.dig('group', 'ciVariables', 'limit')).to be(30000)
expect(graphql_data.dig('group', 'ciVariables', 'nodes')).to contain_exactly({
'id' => variable.to_global_id.to_s,
'key' => 'TEST_VAR',
......
......@@ -41,7 +41,7 @@
post_graphql(query, current_user: user)
expect(graphql_data.dig('project', 'ciVariables', 'limit')).to be(200)
expect(graphql_data.dig('project', 'ciVariables', 'limit')).to be(8000)
expect(graphql_data.dig('project', 'ciVariables', 'nodes')).to contain_exactly({
'id' => variable.to_global_id.to_s,
'key' => 'TEST_VAR',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment