Enable automatic allocation of purchased storage
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 theapplication_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
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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