Use result of destroying container repositories when destroying projects
What does this MR do and why?
Closes #385171 (closed)
This MR updates ContainerRepository::DestroyService
to return a hash with the key status
that will contain success
or error
depending if the operation succeeded or not. This return value is then used in Project::DestroyService
to determine if the operation has already failed with the deletion of container repositories.
Today, we do not check if the deletion of container repositories failed or succeeded so it can happen that a project is successfully destroyed but there are remaining container repositories.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
- Create a project
- Add container repositories to the project
- Delete the project
- All container repositories should be deleted
- If there's an error in deleting container repositories, project deletion should also fail.
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.