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
6abb1eee
Commit
6abb1eee
authored
Oct 03, 2021
by
Matija Čupić
Committed by
Douglas Barbosa Alexandre
Oct 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove create_cross_project_pipeline_worker_rename FF
parent
0f316f43
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
102 deletions
+14
-102
app/models/ci/bridge.rb
app/models/ci/bridge.rb
+1
-5
config/feature_flags/development/create_cross_project_pipeline_worker_rename.yml
...velopment/create_cross_project_pipeline_worker_rename.yml
+0
-8
ee/spec/models/ci/bridge_spec.rb
ee/spec/models/ci/bridge_spec.rb
+3
-21
spec/models/ci/bridge_spec.rb
spec/models/ci/bridge_spec.rb
+7
-47
spec/services/ci/play_bridge_service_spec.rb
spec/services/ci/play_bridge_service_spec.rb
+3
-21
No files found.
app/models/ci/bridge.rb
View file @
6abb1eee
...
...
@@ -31,11 +31,7 @@ module Ci
next
unless
bridge
.
triggers_downstream_pipeline?
bridge
.
run_after_commit
do
if
::
Feature
.
enabled?
(
:create_cross_project_pipeline_worker_rename
,
default_enabled: :yaml
)
::
Ci
::
CreateDownstreamPipelineWorker
.
perform_async
(
bridge
.
id
)
else
::
Ci
::
CreateCrossProjectPipelineWorker
.
perform_async
(
bridge
.
id
)
end
::
Ci
::
CreateDownstreamPipelineWorker
.
perform_async
(
bridge
.
id
)
end
end
...
...
config/feature_flags/development/create_cross_project_pipeline_worker_rename.yml
deleted
100644 → 0
View file @
0f316f43
---
name
:
create_cross_project_pipeline_worker_rename
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70816
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/341410
milestone
:
'
14.4'
type
:
development
group
:
group::pipeline authoring
default_enabled
:
false
ee/spec/models/ci/bridge_spec.rb
View file @
6abb1eee
...
...
@@ -41,28 +41,10 @@ RSpec.describe Ci::Bridge do
bridge
.
enqueue!
end
context
'when the create_cross_project_pipeline_worker_rename feature is enabled'
do
before
do
stub_feature_flags
(
create_cross_project_pipeline_worker_rename:
true
)
end
it
'does not schedule downstream pipeline creation'
do
bridge
.
enqueue!
expect
(
::
Ci
::
CreateDownstreamPipelineWorker
.
jobs
).
to
be_empty
end
end
context
'when the create_cross_project_pipeline_worker_rename feature is not enabled'
do
before
do
stub_feature_flags
(
create_cross_project_pipeline_worker_rename:
false
)
end
it
'does not schedule downstream pipeline creation'
do
bridge
.
enqueue!
it
'does not schedule downstream pipeline creation'
do
bridge
.
enqueue!
expect
(
::
Ci
::
CreateCrossProjectPipelineWorker
.
jobs
).
to
be_empty
end
expect
(
::
Ci
::
CreateDownstreamPipelineWorker
.
jobs
).
to
be_empty
end
end
end
...
...
spec/models/ci/bridge_spec.rb
View file @
6abb1eee
...
...
@@ -73,61 +73,21 @@ RSpec.describe Ci::Bridge do
describe
'state machine transitions'
do
context
'when bridge points towards downstream'
do
%i[created manual]
.
each
do
|
status
|
context
'when the create_cross_project_pipeline_worker_rename feature is enabled'
do
before
do
stub_feature_flags
(
create_cross_project_pipeline_worker_rename:
true
)
end
it
"schedules downstream pipeline creation when the status is
#{
status
}
"
do
bridge
.
status
=
status
bridge
.
enqueue!
expect
(
::
Ci
::
CreateDownstreamPipelineWorker
.
jobs
.
last
[
'args'
]).
to
eq
([
bridge
.
id
])
end
end
context
'when the create_cross_project_pipeline_worker_rename feature is not enabled'
do
before
do
stub_feature_flags
(
create_cross_project_pipeline_worker_rename:
false
)
end
it
"schedules downstream pipeline creation when the status is
#{
status
}
"
do
bridge
.
status
=
status
bridge
.
enqueue!
it
"schedules downstream pipeline creation when the status is
#{
status
}
"
do
bridge
.
status
=
status
expect
(
::
Ci
::
CreateCrossProjectPipelineWorker
.
jobs
.
last
[
'args'
]).
to
eq
([
bridge
.
id
])
end
end
end
context
'when the create_cross_project_pipeline_worker_rename feature is enabled'
do
before
do
stub_feature_flags
(
create_cross_project_pipeline_worker_rename:
true
)
end
it
"schedules downstream pipeline creation when the status is waiting for resource"
do
bridge
.
status
=
:waiting_for_resource
bridge
.
enqueue_waiting_for_resource!
bridge
.
enqueue!
expect
(
::
Ci
::
CreateDownstreamPipelineWorker
.
jobs
.
last
[
'args'
]).
to
eq
([
bridge
.
id
])
end
end
context
'when the create_cross_project_pipeline_worker_rename feature is not enabled'
do
before
do
stub_feature_flags
(
create_cross_project_pipeline_worker_rename:
false
)
end
it
"schedules downstream pipeline creation when the status is waiting for resource"
do
bridge
.
status
=
:waiting_for_resource
it
"schedules downstream pipeline creation when the status is waiting for resource"
do
bridge
.
status
=
:waiting_for_resource
bridge
.
enqueue_waiting_for_resource!
bridge
.
enqueue_waiting_for_resource!
expect
(
::
Ci
::
CreateCrossProjectPipelineWorker
.
jobs
.
last
[
'args'
]).
to
eq
([
bridge
.
id
])
end
expect
(
::
Ci
::
CreateDownstreamPipelineWorker
.
jobs
.
last
[
'args'
]).
to
match_array
([
bridge
.
id
])
end
it
'raises error when the status is failed'
do
...
...
spec/services/ci/play_bridge_service_spec.rb
View file @
6abb1eee
...
...
@@ -29,28 +29,10 @@ RSpec.describe Ci::PlayBridgeService, '#execute' do
expect
(
bridge
.
reload
.
user
).
to
eq
(
user
)
end
context
'when the create_cross_project_pipeline_worker_rename feature is enabled'
do
before
do
stub_feature_flags
(
create_cross_project_pipeline_worker_rename:
true
)
end
it
'enqueues Ci::CreateDownstreamPipelineWorker'
do
expect
(
::
Ci
::
CreateDownstreamPipelineWorker
).
to
receive
(
:perform_async
).
with
(
bridge
.
id
)
execute_service
end
end
it
'enqueues Ci::CreateDownstreamPipelineWorker'
do
expect
(
::
Ci
::
CreateDownstreamPipelineWorker
).
to
receive
(
:perform_async
).
with
(
bridge
.
id
)
context
'when the create_cross_project_pipeline_worker_rename feature is not enabled'
do
before
do
stub_feature_flags
(
create_cross_project_pipeline_worker_rename:
false
)
end
it
'enqueues Ci::CreateCrossProjectPipelineWorker'
do
expect
(
::
Ci
::
CreateCrossProjectPipelineWorker
).
to
receive
(
:perform_async
).
with
(
bridge
.
id
)
execute_service
end
execute_service
end
context
'when a subsequent job is skipped'
do
...
...
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