Commit b8fdefe3 authored by Jan Provaznik's avatar Jan Provaznik

Merge branch '325689-remove-delete-async-ffs' into 'master'

Remove issuable destroy service related FFs [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!61764
parents ea98c985 9c688921
...@@ -26,25 +26,13 @@ module Issuable ...@@ -26,25 +26,13 @@ module Issuable
end end
def delete_todos(actor, issuable) def delete_todos(actor, issuable)
if Feature.enabled?(:destroy_issuable_todos_async, actor, default_enabled: :yaml) TodosDestroyer::DestroyedIssuableWorker
TodosDestroyer::DestroyedIssuableWorker .perform_async(issuable.id, issuable.class.name)
.perform_async(issuable.id, issuable.class.name)
else
TodosDestroyer::DestroyedIssuableWorker
.new
.perform(issuable.id, issuable.class.name)
end
end end
def delete_label_links(actor, issuable) def delete_label_links(actor, issuable)
if Feature.enabled?(:destroy_issuable_label_links_async, actor, default_enabled: :yaml) Issuable::LabelLinksDestroyWorker
Issuable::LabelLinksDestroyWorker .perform_async(issuable.id, issuable.class.name)
.perform_async(issuable.id, issuable.class.name)
else
Issuable::LabelLinksDestroyWorker
.new
.perform(issuable.id, issuable.class.name)
end
end end
end end
end end
......
---
title: Remove issuable destroy service related FFs
merge_request: 61764
author:
type: other
---
name: destroy_issuable_label_links_async
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/60487
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/325689
milestone: '13.12'
type: development
group: group::code review
default_enabled: false
---
name: destroy_issuable_todos_async
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57830
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/325689
milestone: '13.11'
type: development
group: group::code review
default_enabled: false
# frozen_string_literal: true # frozen_string_literal: true
shared_examples_for 'service deleting todos' do shared_examples_for 'service deleting todos' do
before do
stub_feature_flags(destroy_issuable_todos_async: group)
end
it 'destroys associated todos asynchronously' do it 'destroys associated todos asynchronously' do
expect(TodosDestroyer::DestroyedIssuableWorker) expect(TodosDestroyer::DestroyedIssuableWorker)
.to receive(:perform_async) .to receive(:perform_async)
...@@ -12,29 +8,9 @@ shared_examples_for 'service deleting todos' do ...@@ -12,29 +8,9 @@ shared_examples_for 'service deleting todos' do
subject.execute(issuable) subject.execute(issuable)
end end
context 'when destroy_issuable_todos_async feature is disabled for group' do
before do
stub_feature_flags(destroy_issuable_todos_async: false)
end
it 'destroy associated todos synchronously' do
expect_next_instance_of(TodosDestroyer::DestroyedIssuableWorker) do |worker|
expect(worker)
.to receive(:perform)
.with(issuable.id, issuable.class.name)
end
subject.execute(issuable)
end
end
end end
shared_examples_for 'service deleting label links' do shared_examples_for 'service deleting label links' do
before do
stub_feature_flags(destroy_issuable_label_links_async: group)
end
it 'destroys associated label links asynchronously' do it 'destroys associated label links asynchronously' do
expect(Issuable::LabelLinksDestroyWorker) expect(Issuable::LabelLinksDestroyWorker)
.to receive(:perform_async) .to receive(:perform_async)
...@@ -42,20 +18,4 @@ shared_examples_for 'service deleting label links' do ...@@ -42,20 +18,4 @@ shared_examples_for 'service deleting label links' do
subject.execute(issuable) subject.execute(issuable)
end end
context 'when destroy_issuable_label_links_async feature is disabled for group' do
before do
stub_feature_flags(destroy_issuable_label_links_async: false)
end
it 'destroy associated label links synchronously' do
expect_next_instance_of(Issuable::LabelLinksDestroyWorker) do |worker|
expect(worker)
.to receive(:perform)
.with(issuable.id, issuable.class.name)
end
subject.execute(issuable)
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