Allow immediate deletion of projects using API
What does this MR do and why?
Immediately deleting a project is currently possible using the UI. This change brings the same capability to the project deletion API by passing permanently_remove
and full_path
params and deleting the project already marked for deletion. We follow a similar approach of passing permanently_remove
and full_path
to immediately delete a subgroup.
How to set up and validate locally
-
You should have an EE license. Enable the feature flag:
Feature.enabled?(:always_perform_delayed_deletion)
-
Create a project in a group.
-
Mark a project for deletion by
curl --request DELETE --header "PRIVATE-TOKEN: $GL_TOKEN" "https://gdk.test:3000/api/v4/projects/<project-id>"
-
The project should get immediately deleted by
curl --request DELETE --header "PRIVATE-TOKEN: $GL_TOKEN" "https://gdk.test:3000/api/v4/projects/<project-id>?permanently_remove=true&full_path=<full-path-of-project>"
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #396500 (closed)