Commit 5ffb5db0 authored by Adam Hegyi's avatar Adam Hegyi

Cleanup store_ci_pipeline_counts_by_status FF

This change removes the store_ci_pipeline_counts_by_status
feature flag.
parent 2343c8e3
...@@ -38,11 +38,7 @@ module Analytics ...@@ -38,11 +38,7 @@ module Analytics
scope :with_identifier, -> (identifier) { where(identifier: identifier) } scope :with_identifier, -> (identifier) { where(identifier: identifier) }
def self.measurement_identifier_values def self.measurement_identifier_values
if Feature.enabled?(:store_ci_pipeline_counts_by_status, default_enabled: true)
identifiers.values identifiers.values
else
identifiers.values - EXPERIMENTAL_IDENTIFIERS.map { |identifier| identifiers[identifier] }
end
end end
end end
end end
......
---
name: store_ci_pipeline_counts_by_status
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/43027
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/254721
type: development
group: group::analytics
default_enabled: true
...@@ -48,26 +48,10 @@ RSpec.describe Analytics::InstanceStatistics::Measurement, type: :model do ...@@ -48,26 +48,10 @@ RSpec.describe Analytics::InstanceStatistics::Measurement, type: :model do
end end
describe '#measurement_identifier_values' do describe '#measurement_identifier_values' do
subject { described_class.measurement_identifier_values.count }
context 'when the `store_ci_pipeline_counts_by_status` feature flag is off' do
let(:expected_count) { Analytics::InstanceStatistics::Measurement.identifiers.size - Analytics::InstanceStatistics::Measurement::EXPERIMENTAL_IDENTIFIERS.size }
before do
stub_feature_flags(store_ci_pipeline_counts_by_status: false)
end
it { is_expected.to eq(expected_count) }
end
context 'when the `store_ci_pipeline_counts_by_status` feature flag is on' do
let(:expected_count) { Analytics::InstanceStatistics::Measurement.identifiers.size } let(:expected_count) { Analytics::InstanceStatistics::Measurement.identifiers.size }
before do subject { described_class.measurement_identifier_values.count }
stub_feature_flags(store_ci_pipeline_counts_by_status: true)
end
it { is_expected.to eq(expected_count) } it { is_expected.to eq(expected_count) }
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