Add more storage statistics
-
Review changes -
-
Download -
Patches
-
Plain diff
Merged
username-removed-423116 requested to merge siemens/gitlab-ce:feature/more-storage-statistics into master
What does this MR do?
Display more information about used storage:
-
display total repository size for groups ( admin/groups#index
andadmin/groups#show
currently) -
include build artifacts -
include LFS objects -
expose counters in API -
update counters when creating/destroying LFS objects -
update counters when creating/destroying CI builds -
handle shared LFS objects(ignored for now, see this comment) -
use .badge
style after https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7873 is merged
This development is sponsored by @siemens (ping @bufferoverflow)
Are there points in the code the reviewer needs to double check?
Answered in comment below:
- Not sure if
ProjectCacheWorker
is the most appropriate place to update the namespace cache, or if I should add aNamespaceCacheWorker
- Not sure yet how I should display the other object types, it probably makes sense to store them in dedicated columns, but display a total in most places in the interface
Why was this MR needed?
- Currently the storage information is only displayed per project, making it inconvenient to find out how much storage a whole group is using
- The storage information is only for the bare Git repository, other things like builds and uploads are not included
Screenshots
Admin group overview, displays total storage:
Admin project overview, displays total storage:
Admin group detail, displays total and individual counters:
Admin project detail, displays total and individual counters:
User project view, displays repository size + LFS objects:
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
- https://gitlab.com/gitlab-org/gitlab-ce/issues/18352
- https://gitlab.com/gitlab-org/gitlab-ce/issues/17611
Info: Updating storage counters after update
The new storage counters will be updated when necessary, to force an update for specific columns run the following in gitlab-rails console
:
ProjectStatistics.includes(:project).find_each(batch_size: 100) do |stats|
stats.refresh! only: [:build_artifacts_size, :lfs_objects_size]
end
Merge request reports
Compare and
- version 2810e3b3a1
- version 27a228380d
- version 2664e82c55
- version 2564e82c55
- version 24a4697d24
- version 233c7c087e
- version 22e538cde9
- version 21e51d505e
- version 20f90e0d06
- version 19227d41df
- version 1807dc6db6
- version 1756dc030b
- version 1627e81822
- version 1517eaaaeb
- version 1409739fd6
- version 13fda52023
- version 120377d079
- version 114a7123fe
- version 104a7123fe
- version 98a0bee15
- version 857119670
- version 757119670
- version 6424afd78
- version 5fad3db49
- version 4930aca3b
- version 3fdf05570
- version 256d7d287
- version 1c853d56d
- master (base)
- latest version3ef4f74b5 commits,
- version 2810e3b3a16 commits,
- version 27a228380d5 commits,
- version 2664e82c555 commits,
- version 2564e82c555 commits,
- version 24a4697d245 commits,
- version 233c7c087e5 commits,
- version 22e538cde95 commits,
- version 21e51d505e26 commits,
- version 20f90e0d0634 commits,
- version 19227d41df32 commits,
- version 1807dc6db626 commits,
- version 1756dc030b24 commits,
- version 1627e8182218 commits,
- version 1517eaaaeb18 commits,
- version 1409739fd618 commits,
- version 13fda5202315 commits,
- version 120377d07911 commits,
- version 114a7123fe13 commits,
- version 104a7123fe13 commits,
- version 98a0bee1512 commits,
- version 8571196708 commits,
- version 7571196708 commits,
- version 6424afd788 commits,
- version 5fad3db498 commits,
- version 4930aca3b5 commits,
- version 3fdf055704 commits,
- version 256d7d2873 commits,
- version 1c853d56d3 commits,
Compare changes
- Side-by-side
- Inline
Files
50Loading