Introduce Group level setting for Delayed Project removal
What does this MR do?
This MR adds a Group level Setting delayed_project_removal
to configure whether Projects within the scope of the Group should be deleted after a delayed interval, or immediately.
Group admin can configure this Setting under Settings
-> General
-> Permissions, LFS, 2FA
menu (ref screenshot below).
-
When the Setting is enabled, projects within the groups will be deleted after the delayed interval defined in Application Setting.
-
When the Setting is disabled, projects within the groups will be deleted immediately.
The Setting is disabled
by default for all groups.
All user namespace projects are deleted immediately.
Feature flag
The option to let Groups to configure this Setting is gated behind the Feature flag configure_project_deletion_mode
. It is disabled
by default.
The enablement of the flag depends on !36461 (merged)
Test plan
Feature flag enabled? | Use case | Expected behavior | Status |
---|---|---|---|
true |
Project in user namespace | Deletes immediately | |
true |
delayed_project_removal disabled for group |
Deletes immediately | |
true |
delayed_project_removal enabled for group |
Deletes after delayed period | |
false |
Project in user namespace | Deletes after delayed period | |
false |
Project in a group | Deletes after delayed period |
Mentions #220382 (closed)
Screenshots
Database output
Migration output:
== 20200701190523 AddDelayedProjectRemovalToNamespaces: migrating =============
-- add_column(:namespaces, :delayed_project_removal, :boolean, {:default=>false, :null=>false})
-> 0.0053s
== 20200701190523 AddDelayedProjectRemovalToNamespaces: migrated (0.0089s) ====
Rollback output:
== 20200701190523 AddDelayedProjectRemovalToNamespaces: reverting =============
-- remove_column(:namespaces, :delayed_project_removal)
-> 0.0016s
== 20200701190523 AddDelayedProjectRemovalToNamespaces: reverted (0.0084s) ====
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