Skip to content

Allow immediate deletion of projects using API

Abdul Wadood requested to merge 396500-project-double-deletion into master

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

  1. You should have an EE license. Enable the feature flag: Feature.enabled?(:always_perform_delayed_deletion)

  2. Create a project in a group.

  3. Mark a project for deletion by

    curl --request DELETE --header "PRIVATE-TOKEN: $GL_TOKEN" "https://gdk.test:3000/api/v4/projects/<project-id>"

  4. 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.

Related to #396500 (closed)

Edited by Abdul Wadood

Merge request reports

Loading