Skip to content

Enable automatic allocation of purchased storage

Tyler Amos requested to merge 247449_auto-purchased-storage-allocation into master

What does this MR do?

Part of https://gitlab.com/gitlab-org/gitlab/-/issues/247449.

Instead of gating automatic allocation of additional purchased storage for the namespace via a GL.com check, we should gate based on a new ApplicationSetting.

  • Add boolean column, automatic_purchased_storage_allocation, to the application_settings table.
  • Allow setting to be listed and updated via application settings API.

This setting isn't being used just yet, but will be added as part of !43892 (merged).

Migration Output

Up:

== 20201006014605 AddAutomaticPurchasedStorageAllocationToApplicationSettings: migrating
-- add_column(:application_settings, :automatic_purchased_storage_allocation, :boolean, {:default=>false, :null=>false})
   -> 0.0048s
== 20201006014605 AddAutomaticPurchasedStorageAllocationToApplicationSettings: migrated (0.0049s)

Down:

== 20201006014605 AddAutomaticPurchasedStorageAllocationToApplicationSettings: reverting
-- remove_column(:application_settings, :automatic_purchased_storage_allocation, :boolean, {:default=>false, :null=>false})
   -> 0.0022s
== 20201006014605 AddAutomaticPurchasedStorageAllocationToApplicationSettings: reverted (0.0058s)

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 Tyler Amos

Merge request reports