Commit 9690e747 authored by Alper Akgun's avatar Alper Akgun Committed by Bob Van Landuyt

Remove feature flag for usage ping batch counter

- Was default on (true) on all environments
- Was well tested past 3 months not to cause any problems
parent 9149d54a
......@@ -283,12 +283,6 @@ RSpec.describe Gitlab::UsageData do
end
end
[true, false].each do |usage_ping_batch_counter_on|
describe "when the feature flag usage_ping_batch_counter is set to #{usage_ping_batch_counter_on}" do
before do
stub_feature_flags(usage_ping_batch_counter: usage_ping_batch_counter_on)
end
describe '.uncached_data' do
describe '.usage_activity_by_stage' do
it 'includes usage_activity_by_stage data' do
......@@ -722,8 +716,6 @@ RSpec.describe Gitlab::UsageData do
end
end
end
end
end
describe '.recording_ee_finished_at' do
subject { described_class.recording_ee_finish_data }
......
......@@ -40,7 +40,7 @@ module Gitlab
FALLBACK = -1
def count(relation, column = nil, batch: true, start: nil, finish: nil)
if batch && Feature.enabled?(:usage_ping_batch_counter, default_enabled: true)
if batch
Gitlab::Database::BatchCount.batch_count(relation, column, start: start, finish: finish)
else
relation.count
......@@ -50,7 +50,7 @@ module Gitlab
end
def distinct_count(relation, column = nil, batch: true, batch_size: nil, start: nil, finish: nil)
if batch && Feature.enabled?(:usage_ping_batch_counter, default_enabled: true)
if batch
Gitlab::Database::BatchCount.batch_distinct_count(relation, column, batch_size: batch_size, start: start, finish: finish)
else
relation.distinct_count_by(column)
......
......@@ -10,7 +10,6 @@ describe Gitlab::UsageData, :aggregate_failures do
stub_object_store_settings
end
shared_examples "usage data execution" do
describe '#data' do
let!(:ud) { build(:usage_data) }
......@@ -644,23 +643,6 @@ describe Gitlab::UsageData, :aggregate_failures do
end
end
end
end
context 'when usage usage_ping_batch_counter is true' do
before do
stub_feature_flags(usage_ping_batch_counter: true)
end
it_behaves_like 'usage data execution'
end
context 'when usage usage_ping_batch_counter is false' do
before do
stub_feature_flags(usage_ping_batch_counter: false)
end
it_behaves_like 'usage data execution'
end
describe '#merge_requests_usage_data' do
let(:time_period) { { created_at: 2.days.ago..Time.current } }
......
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