Remove issue_perform_after_creation_tasks_async feature flag

parent 60a7fce7
......@@ -38,12 +38,6 @@ module Issues
user_agent_detail_service.create
resolve_discussions_with_issue(issue)
if Feature.disabled?(:issue_perform_after_creation_tasks_async, issue.project, default_enabled: :yaml)
Issues::AfterCreateService
.new(issue.project, current_user)
.execute(issue)
end
super
end
......
......@@ -17,12 +17,10 @@ class NewIssueWorker # rubocop:disable Scalability/IdempotentWorker
issuable.create_cross_references!(user)
if Feature.enabled?(:issue_perform_after_creation_tasks_async, issuable.project, default_enabled: :yaml)
Issues::AfterCreateService
.new(issuable.project, user)
.execute(issuable)
end
end
def issuable_class
Issue
......
---
name: issue_perform_after_creation_tasks_async
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58588
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/21140
milestone: '13.11'
type: development
group: group::geo
default_enabled: true
......@@ -20,22 +20,6 @@ module EE
end
end
end
override :after_create
def after_create(issue)
super
add_issue_sla(issue)
end
private
def add_issue_sla(issue)
return if ::Feature.enabled?(:issue_perform_after_creation_tasks_async, issue.project, default_enabled: :yaml)
return unless issue.sla_available?
::IncidentManagement::Incidents::CreateSlaService.new(issue, current_user).execute
end
end
end
end
......@@ -120,30 +120,6 @@ RSpec.describe Issues::CreateService do
described_class.new(project, user, opts).execute
end
context 'with issue_perform_after_creation_tasks_async feature disabled' do
before do
stub_feature_flags(issue_perform_after_creation_tasks_async: false)
end
it 'calls Issues::AfterCreateService' do
expect_next(::Issues::AfterCreateService, project, user).to receive(:execute)
described_class.new(project, user, opts).execute
end
end
context 'with issue_perform_after_creation_tasks_async feature enabled' do
before do
stub_feature_flags(issue_perform_after_creation_tasks_async: true)
end
it 'does not call Issues::AfterCreateService' do
expect(::Issues::AfterCreateService).not_to receive(:new)
described_class.new(project, user, opts).execute
end
end
context 'when label belongs to project group' do
let(:group) { create(:group) }
let(:group_labels) { create_pair(:group_label, group: group) }
......
......@@ -83,23 +83,6 @@ RSpec.describe NewIssueWorker do
worker.perform(issue.id, user.id)
end
context 'with issue_perform_after_creation_tasks_async feature disabled' do
before do
stub_feature_flags(issue_perform_after_creation_tasks_async: false)
end
it 'does not call Issues::AfterCreateService' do
expect(::Issues::AfterCreateService).not_to receive(:execute)
worker.perform(issue.id, user.id)
end
end
context 'with issue_perform_after_creation_tasks_async feature enabled' do
before do
stub_feature_flags(issue_perform_after_creation_tasks_async: true)
end
it 'calls Issues::AfterCreateService' do
expect_next(::Issues::AfterCreateService)
.to receive(:execute)
......@@ -109,5 +92,4 @@ RSpec.describe NewIssueWorker do
end
end
end
end
end
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