Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b2b8227d
Commit
b2b8227d
authored
Dec 14, 2020
by
Mario de la Ossa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove count_uploads_size_in_storage_stats ff
Cleanup of the count_uploads_size_in_storage_stats feature flag
parent
82313885
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
13 deletions
+5
-13
app/models/project_statistics.rb
app/models/project_statistics.rb
+0
-2
changelogs/unreleased/281950-cleanup-count_uploads_size_in_storage_stats.yml
...ed/281950-cleanup-count_uploads_size_in_storage_stats.yml
+5
-0
spec/models/project_statistics_spec.rb
spec/models/project_statistics_spec.rb
+0
-11
No files found.
app/models/project_statistics.rb
View file @
b2b8227d
...
...
@@ -73,8 +73,6 @@ class ProjectStatistics < ApplicationRecord
end
def
update_uploads_size
return
uploads_size
unless
Feature
.
enabled?
(
:count_uploads_size_in_storage_stats
,
project
)
self
.
uploads_size
=
project
.
uploads
.
sum
(
:size
)
end
...
...
changelogs/unreleased/281950-cleanup-count_uploads_size_in_storage_stats.yml
0 → 100644
View file @
b2b8227d
---
title
:
Removed count_uploads_size_in_storage_stats feature flag
merge_request
:
49998
author
:
type
:
other
spec/models/project_statistics_spec.rb
View file @
b2b8227d
...
...
@@ -313,17 +313,6 @@ RSpec.describe ProjectStatistics do
it
'stores the size of related uploaded files'
do
expect
(
statistics
.
update_uploads_size
).
to
eq
(
3
.
megabytes
)
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
describe
'#update_storage_size'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment