Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add immediate deletion of groups #168

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

buehlmann
Copy link

@buehlmann buehlmann commented Nov 24, 2024

Description of your changes

On GitLab Premium and Ultimate, the delete action on a group just marks the group as deleted. By default, the group will be deleted seven days in the future. To delete the group immediately two rest calls are needed:

  1. DELETE request to /groups/:id which marks the group in the "pending for deletion" state (docs)
  2. DELETE request to /groups/:id with attributes permanently_remove=true and full_path set. The group will be deleted immediate.

This change introduce the optional fields PermanentlyRemove and FullPath on the GitLab group resource. This allows the user to enforce an immediate deletion of GitLab groups.

The same behavior exist by deleting projects (see #121, #149) and could be implemented in the same way as done here for groups. Before this feature can be implemented for projects, one needs to extend the xanzy/go-gitlab client with DeleteProjectOptions along the lines of DeleteGroupOptions.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Provider has been built locally and deployed on a AKS cluster. Deletion of GitLab Groups has been successfully end to end tested with and without PermanentlyRemove and FullPath fields set.

Signed-off-by: Benjamin Bühlmann <[email protected]>
@buehlmann buehlmann changed the title Implements immediate deletion of GitLab groups Add immediate deletion of GitLab groups Nov 24, 2024
@buehlmann buehlmann changed the title Add immediate deletion of GitLab groups feat: Add immediate deletion of groups Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant