Commit aa705838 authored by Dmytro Zaporozhets (DZ)'s avatar Dmytro Zaporozhets (DZ)

Merge branch 'remove-store_merge_request_line_metrics-ff' into 'master'

Remove store_merge_request_line_metrics FF

See merge request gitlab-org/gitlab!43380
parents 0f89e4e0 f975a0a4
---
name: store_merge_request_line_metrics
introduced_by_url:
rollout_issue_url:
group:
type: development
default_enabled: true
...@@ -19,8 +19,6 @@ module Analytics ...@@ -19,8 +19,6 @@ module Analytics
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def line_counts_data def line_counts_data
return {} if Feature.disabled?(:store_merge_request_line_metrics, merge_request.target_project, default_enabled: true)
{ {
added_lines: raw_diff_files.sum(&:added_lines), added_lines: raw_diff_files.sum(&:added_lines),
removed_lines: raw_diff_files.sum(&:removed_lines) removed_lines: raw_diff_files.sum(&:removed_lines)
......
...@@ -33,19 +33,6 @@ RSpec.describe EE::MergeRequestMetricsService do ...@@ -33,19 +33,6 @@ RSpec.describe EE::MergeRequestMetricsService do
it 'updates `removed_lines`' do it 'updates `removed_lines`' do
expect { subject }.to change { merge_request.metrics.removed_lines }.from(nil).to(expected_removed_lines) expect { subject }.to change { merge_request.metrics.removed_lines }.from(nil).to(expected_removed_lines)
end end
context 'when `store_merge_request_line_metrics` feature flag is disabled' do
before do
stub_feature_flags(store_merge_request_line_metrics: false)
end
it 'does not update line counts' do
subject
expect(merge_request.metrics.added_lines).to be_nil
expect(merge_request.metrics.removed_lines).to be_nil
end
end
end end
end end
end end
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