Commit de284cbc authored by Jan Provaznik's avatar Jan Provaznik

Merge branch '227122-clear-memoized-issue-min-and-max-id-in-usage-data' into 'master'

Clear memoized issue min and max id in usage data

Closes #227122

See merge request gitlab-org/gitlab!36166
parents 50c456bc 076db527
......@@ -588,6 +588,8 @@ module Gitlab
end
def clear_memoized
clear_memoization(:issue_minimum_id)
clear_memoization(:issue_maximum_id)
clear_memoization(:user_minimum_id)
clear_memoization(:user_maximum_id)
clear_memoization(:unique_visit_service)
......
......@@ -17,6 +17,14 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
expect(described_class.uncached_data).to include(:usage_activity_by_stage_monthly)
end
it 'clears memoized values' do
%i(issue_minimum_id issue_maximum_id user_minimum_id user_maximum_id unique_visit_service).each do |key|
expect(described_class).to receive(:clear_memoization).with(key)
end
described_class.uncached_data
end
context 'for configure' do
it 'includes accurate usage_activity_by_stage data' do
for_defined_days_back 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