Skip to content

Update DestroyService to use CleanupTagsService instead of delete_tags!

What does this MR do and why?

Closes #375604 (closed).

This MR replaces delete_tags! in DestroyService with a call to the Projects::ContainerRepository::CleanupTagsService as suggested here #375604 (comment 1118935553).

As part of the issue, we also add an additional log containing the container ID and path together with the error message whenever the delete process fails.

To reduce risk and allow for a gradual rollout, we also put the changes behind a feature flag. Rollout issue can be found here #381445 (closed).

Screenshots or screen recordings

No UI change.

How to set up and validate locally

You can run the updated test locally here:

bundle exec rspec spec/services/projects/container_repository/destroy_service_spec.rb

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Changelog: fixed

Edited by Adie (she/her)

Merge request reports