Skip to content

Draft: Storage quota inline alert

Ragnar Hardarson requested to merge namespace-project-level-storage-alerts into master

What does this MR do?

Screenshots

No excess storage used, has purchased storage
Screenshot_2020-10-01_at_10.35.01
No excess storage used, has not purchased storage
Screenshot_2020-10-01_at_10.39.20
Usage warning (>75%), has purchased storage
Screenshot_2020-10-01_at_10.39.42

Test this locally

Execute the following in your rails console

Feature.enable(:namespace_storage_limit)

n = Namespace.find_by(name: "Green demons")
n.root_storage_statistics&.destroy!
s = Namespace::RootStorageStatistics.new(
namespace: n,
build_artifacts_size: 400000,
wiki_size: 300000,
repository_size: 3900000,
packages_size: 3800000,
lfs_objects_size: 4800000
)
s.storage_size = s.repository_size + s.lfs_objects_size + s.wiki_size + s.build_artifacts_size + s.packages_size
s.save!


n.additional_purchased_storage_size = 15
n.save!

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Ragnar Hardarson

Merge request reports