Commit fc194ab2 authored by Allison Browne's avatar Allison Browne

Remove project_transactionless_destroy feature flag

Remove flag and testing to ensure code works with or without the
feature flag
parent a3aa78d8
...@@ -107,12 +107,7 @@ module Projects ...@@ -107,12 +107,7 @@ module Projects
end end
project.leave_pool_repository project.leave_pool_repository
if Gitlab::Ci::Features.project_transactionless_destroy?(project)
destroy_project_related_records(project) destroy_project_related_records(project)
else
Project.transaction { destroy_project_related_records(project) }
end
end end
def destroy_project_related_records(project) def destroy_project_related_records(project)
......
---
title: Remove project_transactionless_destroy feature flag
merge_request: 55795
author:
type: changed
---
name: project_transactionless_destroy
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/39367
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/255972
milestone: '13.4'
type: development
group: group::continuous integration
default_enabled: false
...@@ -20,7 +20,6 @@ RSpec.describe Projects::DestroyService do ...@@ -20,7 +20,6 @@ RSpec.describe Projects::DestroyService do
stub_container_registry_tags(repository: :any, tags: []) stub_container_registry_tags(repository: :any, tags: [])
end end
shared_examples 'project destroy ee' do
context 'when project is a mirror' do context 'when project is a mirror' do
let(:max_capacity) { Gitlab::CurrentSettings.mirror_max_capacity } let(:max_capacity) { Gitlab::CurrentSettings.mirror_max_capacity }
let_it_be(:project_mirror) { create(:project, :mirror, :repository, :import_scheduled) } let_it_be(:project_mirror) { create(:project, :mirror, :repository, :import_scheduled) }
...@@ -96,17 +95,4 @@ RSpec.describe Projects::DestroyService do ...@@ -96,17 +95,4 @@ RSpec.describe Projects::DestroyService do
expect { subject.execute }.to change(AuditEvent, :count) expect { subject.execute }.to change(AuditEvent, :count)
end end
end end
end
context 'when project_transactionless_destroy enabled' do
it_behaves_like 'project destroy ee'
end
context 'when project_transactionless_destroy disabled', :sidekiq_inline do
before do
stub_feature_flags(project_transactionless_destroy: false)
end
it_behaves_like 'project destroy ee'
end
end end
...@@ -38,10 +38,6 @@ module Gitlab ...@@ -38,10 +38,6 @@ module Gitlab
::Feature.enabled?(:ci_disallow_to_create_merge_request_pipelines_in_target_project, target_project) ::Feature.enabled?(:ci_disallow_to_create_merge_request_pipelines_in_target_project, target_project)
end end
def self.project_transactionless_destroy?(project)
Feature.enabled?(:project_transactionless_destroy, project, default_enabled: false)
end
def self.trace_overwrite? def self.trace_overwrite?
::Feature.enabled?(:ci_trace_overwrite, type: :ops, default_enabled: false) ::Feature.enabled?(:ci_trace_overwrite, type: :ops, default_enabled: false)
end end
......
...@@ -85,7 +85,6 @@ RSpec.describe Projects::DestroyService, :aggregate_failures do ...@@ -85,7 +85,6 @@ RSpec.describe Projects::DestroyService, :aggregate_failures do
end end
end end
shared_examples 'project destroy' do
it_behaves_like 'deleting the project' it_behaves_like 'deleting the project'
it 'invalidates personal_project_count cache' do it 'invalidates personal_project_count cache' do
...@@ -424,19 +423,6 @@ RSpec.describe Projects::DestroyService, :aggregate_failures do ...@@ -424,19 +423,6 @@ RSpec.describe Projects::DestroyService, :aggregate_failures do
expect(project.builds).to be_empty expect(project.builds).to be_empty
end end
end end
end
context 'when project_transactionless_destroy enabled' do
it_behaves_like 'project destroy'
end
context 'when project_transactionless_destroy disabled', :sidekiq_inline do
before do
stub_feature_flags(project_transactionless_destroy: false)
end
it_behaves_like 'project destroy'
end
def destroy_project(project, user, params = {}) def destroy_project(project, user, params = {})
described_class.new(project, user, params).public_send(async ? :async_execute : :execute) described_class.new(project, user, params).public_send(async ? :async_execute : :execute)
......
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