diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-28 18:05:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-28 18:05:58 +0300 |
commit | a77db6bc47d8cdd9edae2ec22f640821d0794404 (patch) | |
tree | 15861a5f1ec29e07c2012102e463402bb7dc8c2d /app/services | |
parent | 6cf6996f183bdff46e73431c07bfb723066a8222 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/projects/container_repository/delete_tags_service.rb | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/app/services/projects/container_repository/delete_tags_service.rb b/app/services/projects/container_repository/delete_tags_service.rb index 5129e2269a8..6a8b68d8ae3 100644 --- a/app/services/projects/container_repository/delete_tags_service.rb +++ b/app/services/projects/container_repository/delete_tags_service.rb @@ -9,25 +9,11 @@ module Projects tag_names = params[:tags] return error('not tags specified') if tag_names.blank? - if can_use? - smart_delete(container_repository, tag_names) - else - unsafe_delete(container_repository, tag_names) - end + smart_delete(container_repository, tag_names) end private - def unsafe_delete(container_repository, tag_names) - deleted_tags = tag_names.select do |tag_name| - container_repository.tag(tag_name).unsafe_delete - end - - return error('could not delete tags') if deleted_tags.empty? - - success(deleted: deleted_tags) - end - # Replace a tag on the registry with a dummy tag. # This is a hack as the registry doesn't support deleting individual # tags. This code effectively pushes a dummy image and assigns the tag to it. @@ -57,10 +43,6 @@ module Projects error('could not delete tags') end end - - def can_use? - Feature.enabled?(:container_registry_smart_delete, project, default_enabled: true) - end end end end |