Commit 75b9287a authored by Matija Čupić's avatar Matija Čupić

Remove track_all_ci_template_inclusions FF

Removes the track_all_ci_templates_inclusion feature flag. Now all
templates are being tracked automatically.

Changelog: other
parent 9a887738
---
name: track_all_ci_template_inclusions
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/69204
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/339684
milestone: '14.3'
type: development
group: group::pipeline authoring
default_enabled: false
......@@ -21,8 +21,6 @@ module Gitlab::UsageDataCounters
class << self
def track_unique_project_event(project_id:, template:, config_source:)
return unless TEMPLATE_TO_EVENT[template] || Feature.enabled?(:track_all_ci_template_inclusions, default_enabled: :yaml)
Gitlab::UsageDataCounters::HLLRedisCounter.track_event(ci_template_event_name(template, config_source), values: project_id)
end
......
......@@ -90,23 +90,6 @@ RSpec.describe Gitlab::UsageDataCounters::CiTemplateUniqueCounter do
end.not_to raise_error
end
context 'when feature flag is disabled' do
before do
stub_feature_flags(track_all_ci_template_inclusions: false)
end
it "does not track #{template}" do
expect(Gitlab::UsageDataCounters::HLLRedisCounter).not_to(receive(:track_event))
described_class.track_unique_project_event(project_id: project_id, template: template, config_source: config_source)
end
end
context 'when feature flag is enabled' do
before do
stub_feature_flags(track_all_ci_template_inclusions: true)
end
it "tracks #{template}" do
expected_template_event_name = described_class.ci_template_event_name(template, :repository_source)
expect(Gitlab::UsageDataCounters::HLLRedisCounter).to(receive(:track_event)).with(expected_template_event_name, values: project_id)
......@@ -116,5 +99,4 @@ RSpec.describe Gitlab::UsageDataCounters::CiTemplateUniqueCounter do
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