Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
58597879
Commit
58597879
authored
Apr 09, 2021
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove issue_perform_after_creation_tasks_async feature flag
parent
60a7fce7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
81 deletions
+7
-81
app/services/issues/create_service.rb
app/services/issues/create_service.rb
+0
-6
app/workers/new_issue_worker.rb
app/workers/new_issue_worker.rb
+3
-5
config/feature_flags/development/issue_perform_after_creation_tasks_async.yml
.../development/issue_perform_after_creation_tasks_async.yml
+0
-8
ee/app/services/ee/issues/create_service.rb
ee/app/services/ee/issues/create_service.rb
+0
-16
spec/services/issues/create_service_spec.rb
spec/services/issues/create_service_spec.rb
+0
-24
spec/workers/new_issue_worker_spec.rb
spec/workers/new_issue_worker_spec.rb
+4
-22
No files found.
app/services/issues/create_service.rb
View file @
58597879
...
...
@@ -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
...
...
app/workers/new_issue_worker.rb
View file @
58597879
...
...
@@ -17,11 +17,9 @@ 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
Issues
::
AfterCreateService
.
new
(
issuable
.
project
,
user
)
.
execute
(
issuable
)
end
def
issuable_class
...
...
config/feature_flags/development/issue_perform_after_creation_tasks_async.yml
deleted
100644 → 0
View file @
60a7fce7
---
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
ee/app/services/ee/issues/create_service.rb
View file @
58597879
...
...
@@ -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
spec/services/issues/create_service_spec.rb
View file @
58597879
...
...
@@ -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
)
}
...
...
spec/workers/new_issue_worker_spec.rb
View file @
58597879
...
...
@@ -83,29 +83,11 @@ 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
'calls Issues::AfterCreateService'
do
expect_next
(
::
Issues
::
AfterCreateService
)
.
to
receive
(
:execute
)
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
)
worker
.
perform
(
issue
.
id
,
user
.
id
)
end
worker
.
perform
(
issue
.
id
,
user
.
id
)
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment