From 805635c4718749ae5427b2cf29f10493594e4c7e Mon Sep 17 00:00:00 2001 From: Igor Drozdov <idrozdov@gitlab.com> Date: Thu, 25 Nov 2021 20:34:39 +0000 Subject: [PATCH] Remove limited_diff_highlighting feature flag --- .../development/limited_diff_highlighting.yml | 8 -------- lib/gitlab/diff/highlight.rb | 1 - spec/lib/gitlab/diff/highlight_spec.rb | 14 -------------- 3 files changed, 23 deletions(-) delete mode 100644 config/feature_flags/development/limited_diff_highlighting.yml diff --git a/config/feature_flags/development/limited_diff_highlighting.yml b/config/feature_flags/development/limited_diff_highlighting.yml deleted file mode 100644 index 1cfd9927c7a..00000000000 --- a/config/feature_flags/development/limited_diff_highlighting.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: limited_diff_highlighting -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/53768 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/323566 -milestone: '13.12' -type: development -group: group::source code -default_enabled: true diff --git a/lib/gitlab/diff/highlight.rb b/lib/gitlab/diff/highlight.rb index aedcfe3cb40..7ee9b862876 100644 --- a/lib/gitlab/diff/highlight.rb +++ b/lib/gitlab/diff/highlight.rb @@ -159,7 +159,6 @@ module Gitlab end def blobs_too_large? - return false unless Feature.enabled?(:limited_diff_highlighting, project, default_enabled: :yaml) return true if Gitlab::Highlight.too_large?(diff_file.old_blob&.size) Gitlab::Highlight.too_large?(diff_file.new_blob&.size) diff --git a/spec/lib/gitlab/diff/highlight_spec.rb b/spec/lib/gitlab/diff/highlight_spec.rb index 94b28c38fa2..624160d2f48 100644 --- a/spec/lib/gitlab/diff/highlight_spec.rb +++ b/spec/lib/gitlab/diff/highlight_spec.rb @@ -151,20 +151,6 @@ RSpec.describe Gitlab::Diff::Highlight do expect(subject[2].rich_text).to eq(%Q{ <span id="LC7" class="line" lang=""> def popen(cmd, path=nil)</span>\n}) expect(subject[2].rich_text).to be_html_safe end - - context 'when limited_diff_highlighting is disabled' do - before do - stub_feature_flags(limited_diff_highlighting: false) - stub_feature_flags(diff_line_syntax_highlighting: false) - end - - it 'blobs are highlighted as plain text with loading all data' do - expect(diff_file.blob).to receive(:load_all_data!).twice - - code = %Q{ <span id="LC7" class="line" lang=""> def popen(cmd, path=nil)</span>\n} - expect(subject[2].rich_text).to eq(code) - end - end end end end -- 2.30.9