Commit b9a5347a authored by Robert Speicher's avatar Robert Speicher

Merge branch '281950-cleanup-count_uploads_size_in_storage_stats' into 'master'

Remove count_uploads_size_in_storage_stats ff

See merge request gitlab-org/gitlab!49998
parents 1643cf25 b2b8227d
...@@ -73,8 +73,6 @@ class ProjectStatistics < ApplicationRecord ...@@ -73,8 +73,6 @@ class ProjectStatistics < ApplicationRecord
end end
def update_uploads_size def update_uploads_size
return uploads_size unless Feature.enabled?(:count_uploads_size_in_storage_stats, project)
self.uploads_size = project.uploads.sum(:size) self.uploads_size = project.uploads.sum(:size)
end end
......
---
title: Removed count_uploads_size_in_storage_stats feature flag
merge_request: 49998
author:
type: other
...@@ -313,17 +313,6 @@ RSpec.describe ProjectStatistics do ...@@ -313,17 +313,6 @@ RSpec.describe ProjectStatistics do
it 'stores the size of related uploaded files' do it 'stores the size of related uploaded files' do
expect(statistics.update_uploads_size).to eq(3.megabytes) expect(statistics.update_uploads_size).to eq(3.megabytes)
end end
context 'with feature flag disabled' do
before do
statistics.update_columns(uploads_size: 0)
stub_feature_flags(count_uploads_size_in_storage_stats: false)
end
it 'does not store the size of related uploaded files' do
expect(statistics.update_uploads_size).to eq(0)
end
end
end end
describe '#update_storage_size' do describe '#update_storage_size' 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