Commit 074128b8 authored by Markus Koller's avatar Markus Koller

Merge branch '257821-remove-container_registry_fast_tag_delete-feature-flag' into 'master'

Remove the `container_registry_fast_tag_delete` feature flag

See merge request gitlab-org/gitlab!43555
parents 6c3ddc14 a101684d
...@@ -23,9 +23,7 @@ module Projects ...@@ -23,9 +23,7 @@ module Projects
end end
def delete_service def delete_service
fast_delete_enabled = Feature.enabled?(:container_registry_fast_tag_delete, default_enabled: true) if @container_repository.client.supports_tag_delete?
if fast_delete_enabled && @container_repository.client.supports_tag_delete?
::Projects::ContainerRepository::Gitlab::DeleteTagsService.new(@container_repository, @tag_names) ::Projects::ContainerRepository::Gitlab::DeleteTagsService.new(@container_repository, @tag_names)
else else
::Projects::ContainerRepository::ThirdParty::DeleteTagsService.new(@container_repository, @tag_names) ::Projects::ContainerRepository::ThirdParty::DeleteTagsService.new(@container_repository, @tag_names)
......
---
name: container_registry_fast_tag_delete
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/23325
rollout_issue_url:
group: group::package
type: development
default_enabled: true
...@@ -104,7 +104,6 @@ RSpec.describe Projects::ContainerRepository::DeleteTagsService do ...@@ -104,7 +104,6 @@ RSpec.describe Projects::ContainerRepository::DeleteTagsService do
end end
context 'when the registry supports fast delete' do context 'when the registry supports fast delete' do
context 'and the feature is enabled' do
before do before do
allow(repository.client).to receive(:supports_tag_delete?).and_return(true) allow(repository.client).to receive(:supports_tag_delete?).and_return(true)
end end
...@@ -137,29 +136,6 @@ RSpec.describe Projects::ContainerRepository::DeleteTagsService do ...@@ -137,29 +136,6 @@ RSpec.describe Projects::ContainerRepository::DeleteTagsService do
end end
end end
context 'and the feature is disabled' do
before do
stub_feature_flags(container_registry_fast_tag_delete: false)
end
it_behaves_like 'calling the correct delete tags service', ::Projects::ContainerRepository::ThirdParty::DeleteTagsService
it_behaves_like 'handling invalid params'
context 'with the real service' do
before do
stub_upload('sha256:4435000728ee66e6a80e55637fc22725c256b61de344a2ecdeaac6bdb36e8bc3')
tags.each { |tag| stub_put_manifest_request(tag) }
expect_delete_tag_by_digest('sha256:dummy')
end
it { is_expected.to include(status: :success) }
it_behaves_like 'logging a success response'
end
end
end
context 'when the registry does not support fast delete' do context 'when the registry does not support fast delete' do
before do before do
allow(repository.client).to receive(:supports_tag_delete?).and_return(false) allow(repository.client).to receive(:supports_tag_delete?).and_return(false)
......
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