From bdeda8e613c87cb2d4227e9911862164ab955830 Mon Sep 17 00:00:00 2001 From: Patrick Bajao Date: Fri, 13 Dec 2024 17:38:45 +0800 Subject: [PATCH] Remove increase_lsif_artifacts_limit feature flag We have increase the LSIF artifacts limit in code before but we are now setting the new value in the DB. So we no longer need the feature flag. Changelog: changed --- app/services/ci/job_artifacts/create_service.rb | 6 +----- .../increase_lsif_artifacts_limit.yml | 9 --------- .../services/ci/job_artifacts/create_service_spec.rb | 12 +----------- 3 files changed, 2 insertions(+), 25 deletions(-) delete mode 100644 config/feature_flags/gitlab_com_derisk/increase_lsif_artifacts_limit.yml diff --git a/app/services/ci/job_artifacts/create_service.rb b/app/services/ci/job_artifacts/create_service.rb index 271a0a03a37760..82f2c22adadc39 100644 --- a/app/services/ci/job_artifacts/create_service.rb +++ b/app/services/ci/job_artifacts/create_service.rb @@ -77,11 +77,7 @@ def lsif?(type) end def max_size(type) - if Feature.enabled?(:increase_lsif_artifacts_limit, project) && lsif?(type) - 200.megabytes.to_i - else - Ci::JobArtifact.max_artifact_size(type: type, project: project) - end + Ci::JobArtifact.max_artifact_size(type: type, project: project) end def too_large_error diff --git a/config/feature_flags/gitlab_com_derisk/increase_lsif_artifacts_limit.yml b/config/feature_flags/gitlab_com_derisk/increase_lsif_artifacts_limit.yml deleted file mode 100644 index 0054a9e0080683..00000000000000 --- a/config/feature_flags/gitlab_com_derisk/increase_lsif_artifacts_limit.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: increase_lsif_artifacts_limit -feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/497150 -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/170393 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/500624 -milestone: '17.6' -group: group::code review -type: gitlab_com_derisk -default_enabled: false diff --git a/spec/services/ci/job_artifacts/create_service_spec.rb b/spec/services/ci/job_artifacts/create_service_spec.rb index 016437f30d8ca5..3bfd6ed6bed913 100644 --- a/spec/services/ci/job_artifacts/create_service_spec.rb +++ b/spec/services/ci/job_artifacts/create_service_spec.rb @@ -20,7 +20,7 @@ shared_examples_for 'handling lsif artifact' do context 'when artifact is lsif' do let(:artifact_type) { 'lsif' } - let(:max_artifact_size) { 100.megabytes.to_i } + let(:max_artifact_size) { 200.megabytes.to_i } before do allow(Ci::JobArtifact) @@ -36,16 +36,6 @@ it 'returns 200MB in bytes as maximum size' do expect(authorize[:headers][:MaximumSize]).to eq(200.megabytes.to_i) end - - context 'when increase_lsif_artifacts_limit is disabled' do - before do - stub_feature_flags(increase_lsif_artifacts_limit: false) - end - - it 'returns maximum_size based on Ci::JobArtifact.max_artifact_size' do - expect(authorize[:headers][:MaximumSize]).to eq(max_artifact_size) - end - end end end -- GitLab