Commit 95e43598 authored by Shinya Maeda's avatar Shinya Maeda

Merge branch '10io-remove-feature-flag-container_registry_cleanup' into 'master'

Remove the `container_registry_cleanup` feature flag

See merge request gitlab-org/gitlab!44161
parents 3e8506aa 4b78157a
...@@ -4,7 +4,6 @@ module Projects ...@@ -4,7 +4,6 @@ module Projects
module ContainerRepository module ContainerRepository
class CleanupTagsService < BaseService class CleanupTagsService < BaseService
def execute(container_repository) def execute(container_repository)
return error('feature disabled') unless can_use?
return error('access denied') unless can_destroy? return error('access denied') unless can_destroy?
return error('invalid regex') unless valid_regex? return error('invalid regex') unless valid_regex?
...@@ -74,10 +73,6 @@ module Projects ...@@ -74,10 +73,6 @@ module Projects
can?(current_user, :destroy_container_image, project) can?(current_user, :destroy_container_image, project)
end end
def can_use?
Feature.enabled?(:container_registry_cleanup, project, default_enabled: true)
end
def valid_regex? def valid_regex?
%w(name_regex_delete name_regex name_regex_keep).each do |param_name| %w(name_regex_delete name_regex name_regex_keep).each do |param_name|
regex = params[param_name] regex = params[param_name]
......
---
name: container_registry_cleanup
introduced_by_url:
rollout_issue_url:
group:
type: development
default_enabled: true
...@@ -12,8 +12,6 @@ RSpec.describe Projects::ContainerRepository::CleanupTagsService do ...@@ -12,8 +12,6 @@ RSpec.describe Projects::ContainerRepository::CleanupTagsService do
before do before do
project.add_maintainer(user) project.add_maintainer(user)
stub_feature_flags(container_registry_cleanup: true)
stub_container_registry_config(enabled: true) stub_container_registry_config(enabled: true)
stub_container_registry_tags( stub_container_registry_tags(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment