Commit bcd75360 authored by Mikołaj Wawrzyniak's avatar Mikołaj Wawrzyniak

Merge branch '350055-use-default_enabled-yaml-for-usage_data-increment_counter-api' into 'master'

Use default_enabled: yaml for usage_data increment_counter API

See merge request gitlab-org/gitlab!77982
parents 6bec28a4 6d3b8261
...@@ -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