Skip to content

WIP: Allow increasing storage temporarily

What does this MR do?

Related to https://gitlab.com/gitlab-org/gitlab/-/issues/227053

This MR calls the mutation to increase the storage tempoarily and the different states of the usage quota page that come with that.

Page: http://localhost:3000/groups/gitlab-org/-/usage_quotas#storage-quota-tab

How to enable locally

# Enable feature flag
Feature.enable(:temporary_storage_increase)

# Faking storage statistics
n = Namespace.find_by(name: "gitlab-org")
n.root_storage_statistics&.destroy!
s = Namespace::RootStorageStatistics.new(storage_size: 10.megabytes)

# Faking storage limit
n.additional_purchased_storage_size = 15
n.save!

How to reset after setting temporary storage increase

n = Namespace.find_by(name: "gitlab-org")
n.update_attribute(:temporary_storage_increase_ends_on, nil)
n.save

Screenshots

When eligible When activating When activated
Screenshot_2020-07-28_at_17.42.16 temporary-storage-increase-loading Screenshot_2020-07-29_at_00.38.18

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 Nicolas Dular

Merge request reports