From 12f01f70c95e0ffddd8c9fd899afa6ab58896a4c Mon Sep 17 00:00:00 2001 From: Igor Drozdov Date: Tue, 3 Nov 2020 14:55:23 +0300 Subject: [PATCH] Changes limit for lsif artifacts to 100MB After the fix of the in-memory processing we can increase the limit --- ...-default-for-ci-max-artifact-size-lsif.yml | 5 +++++ ...t_size_lsif_of_plan_limits_from20_to100.rb | 21 +++++++++++++++++++ db/schema_migrations/20201105135051 | 1 + db/structure.sql | 2 +- doc/administration/instance_limits.md | 2 +- doc/user/project/code_intelligence.md | 4 +++- 6 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 changelogs/unreleased/id-change-default-for-ci-max-artifact-size-lsif.yml create mode 100644 db/migrate/20201105135051_change_default_value_of_ci_max_artifact_size_lsif_of_plan_limits_from20_to100.rb create mode 100644 db/schema_migrations/20201105135051 diff --git a/changelogs/unreleased/id-change-default-for-ci-max-artifact-size-lsif.yml b/changelogs/unreleased/id-change-default-for-ci-max-artifact-size-lsif.yml new file mode 100644 index 00000000000000..aaeb7deff002ad --- /dev/null +++ b/changelogs/unreleased/id-change-default-for-ci-max-artifact-size-lsif.yml @@ -0,0 +1,5 @@ +--- +title: Changes limit for lsif artifacts to 100MB +merge_request: 46980 +author: +type: changed diff --git a/db/migrate/20201105135051_change_default_value_of_ci_max_artifact_size_lsif_of_plan_limits_from20_to100.rb b/db/migrate/20201105135051_change_default_value_of_ci_max_artifact_size_lsif_of_plan_limits_from20_to100.rb new file mode 100644 index 00000000000000..d53f81ecabb0b6 --- /dev/null +++ b/db/migrate/20201105135051_change_default_value_of_ci_max_artifact_size_lsif_of_plan_limits_from20_to100.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class ChangeDefaultValueOfCiMaxArtifactSizeLsifOfPlanLimitsFrom20To100 < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + change_column_default :plan_limits, :ci_max_artifact_size_lsif, 100 + execute('UPDATE plan_limits SET ci_max_artifact_size_lsif = 100 WHERE ci_max_artifact_size_lsif = 20') + end + end + + def down + with_lock_retries do + change_column_default :plan_limits, :ci_max_artifact_size_lsif, 20 + execute('UPDATE plan_limits SET ci_max_artifact_size_lsif = 20 WHERE ci_max_artifact_size_lsif = 100') + end + end +end diff --git a/db/schema_migrations/20201105135051 b/db/schema_migrations/20201105135051 new file mode 100644 index 00000000000000..26ebc47fd3a0f2 --- /dev/null +++ b/db/schema_migrations/20201105135051 @@ -0,0 +1 @@ +41cc59ebfeed647b2525191befa43c1faeb1c133a687a5c93124f4b4c745117a \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index a4fe8fb0f57319..fd427a371980cc 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -14631,7 +14631,7 @@ CREATE TABLE plan_limits ( offset_pagination_limit integer DEFAULT 50000 NOT NULL, ci_instance_level_variables integer DEFAULT 25 NOT NULL, storage_size_limit integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_lsif integer DEFAULT 20 NOT NULL, + ci_max_artifact_size_lsif integer DEFAULT 100 NOT NULL, ci_max_artifact_size_archive integer DEFAULT 0 NOT NULL, ci_max_artifact_size_metadata integer DEFAULT 0 NOT NULL, ci_max_artifact_size_trace integer DEFAULT 0 NOT NULL, diff --git a/doc/administration/instance_limits.md b/doc/administration/instance_limits.md index 9bc3432c59e329..ec56a59fdc2f5e 100644 --- a/doc/administration/instance_limits.md +++ b/doc/administration/instance_limits.md @@ -347,7 +347,7 @@ setting is used: | `ci_max_artifact_size_license_management` | 0 | | `ci_max_artifact_size_license_scanning` | 0 | | `ci_max_artifact_size_load_performance` | 0 | -| `ci_max_artifact_size_lsif` | 20 MB ([introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/37226) in GitLab 13.3) | +| `ci_max_artifact_size_lsif` | 100 MB ([Introduced at 20 MB](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/37226) in GitLab 13.3 and [raised to 100 MB](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46980) in GitLab 13.6.) | | `ci_max_artifact_size_metadata` | 0 | | `ci_max_artifact_size_metrics_referee` | 0 | | `ci_max_artifact_size_metrics` | 0 | diff --git a/doc/user/project/code_intelligence.md b/doc/user/project/code_intelligence.md index d0c5a24826a80e..5f96f65ea0622b 100644 --- a/doc/user/project/code_intelligence.md +++ b/doc/user/project/code_intelligence.md @@ -35,7 +35,9 @@ code_navigation: lsif: dump.lsif ``` -The generated LSIF file must be less than 170MiB. +The generated LSIF file size may be limited by +the [artifact application limits (`ci_max_artifact_size_lsif`)](../../administration/instance_limits.md#maximum-file-size-per-type-of-artifact), +default to 100MB (configurable by an instance administrator). After the job succeeds, code intelligence data can be viewed while browsing the code: -- GitLab