Commit 6d3b8261 authored by alinamihaila's avatar alinamihaila Committed by Mikołaj Wawrzyniak

Use feature flag default yaml for increment_counter

  - Use default_enabled: true for increment_counter
  usage data API
  - This allows to have events tracked using Redis with
  usage data API in self-managed
parent f251f699
...@@ -561,7 +561,7 @@ module API ...@@ -561,7 +561,7 @@ module API
def increment_counter(event_name) def increment_counter(event_name)
feature_name = "usage_data_#{event_name}" feature_name = "usage_data_#{event_name}"
return unless Feature.enabled?(feature_name) return unless Feature.enabled?(feature_name, default_enabled: :yaml)
Gitlab::UsageDataCounters.count(event_name) Gitlab::UsageDataCounters.count(event_name)
rescue StandardError => error rescue StandardError => error
......
...@@ -86,6 +86,7 @@ RSpec.describe API::UsageData do ...@@ -86,6 +86,7 @@ RSpec.describe API::UsageData do
context 'with unknown event' do context 'with unknown event' do
before do before do
skip_feature_flags_yaml_validation skip_feature_flags_yaml_validation
skip_default_enabled_yaml_check
end end
it 'returns status ok' do it 'returns status ok' do
......
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