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
ec91bb1b
Commit
ec91bb1b
authored
Mar 24, 2020
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ci_drop_bridge_on_downstream_errors flag
parent
255dfe29
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
43 deletions
+0
-43
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+0
-17
app/services/ci/create_cross_project_pipeline_service.rb
app/services/ci/create_cross_project_pipeline_service.rb
+0
-2
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+0
-24
No files found.
app/models/ci/pipeline.rb
View file @
ec91bb1b
...
@@ -231,14 +231,6 @@ module Ci
...
@@ -231,14 +231,6 @@ module Ci
end
end
end
end
after_transition
created: :pending
do
|
pipeline
|
next
if
Feature
.
enabled?
(
:ci_drop_bridge_on_downstream_errors
,
pipeline
.
project
,
default_enabled:
true
)
next
unless
pipeline
.
bridge_triggered?
next
if
pipeline
.
bridge_waiting?
pipeline
.
update_bridge_status!
end
after_transition
any
=>
[
:success
,
:failed
]
do
|
pipeline
|
after_transition
any
=>
[
:success
,
:failed
]
do
|
pipeline
|
pipeline
.
run_after_commit
do
pipeline
.
run_after_commit
do
if
Feature
.
enabled?
(
:ci_pipeline_fixed_notifications
)
if
Feature
.
enabled?
(
:ci_pipeline_fixed_notifications
)
...
@@ -761,15 +753,6 @@ module Ci
...
@@ -761,15 +753,6 @@ module Ci
end
end
end
end
def
update_bridge_status!
raise
ArgumentError
unless
bridge_triggered?
raise
BridgeStatusError
unless
source_bridge
.
active?
source_bridge
.
success!
rescue
=>
e
Gitlab
::
ErrorTracking
.
track_exception
(
e
,
pipeline_id:
id
)
end
def
bridge_triggered?
def
bridge_triggered?
source_bridge
.
present?
source_bridge
.
present?
end
end
...
...
app/services/ci/create_cross_project_pipeline_service.rb
View file @
ec91bb1b
...
@@ -34,8 +34,6 @@ module Ci
...
@@ -34,8 +34,6 @@ module Ci
end
end
downstream_pipeline
.
tap
do
|
pipeline
|
downstream_pipeline
.
tap
do
|
pipeline
|
next
if
Feature
.
disabled?
(
:ci_drop_bridge_on_downstream_errors
,
project
,
default_enabled:
true
)
update_bridge_status!
(
@bridge
,
pipeline
)
update_bridge_status!
(
@bridge
,
pipeline
)
end
end
end
end
...
...
spec/models/ci/pipeline_spec.rb
View file @
ec91bb1b
...
@@ -3061,20 +3061,6 @@ describe Ci::Pipeline, :mailer do
...
@@ -3061,20 +3061,6 @@ describe Ci::Pipeline, :mailer do
expect
(
pipeline
.
source_bridge
).
to
eq
bridge
expect
(
pipeline
.
source_bridge
).
to
eq
bridge
end
end
end
end
describe
'#update_bridge_status!'
do
it
'can update bridge status if it is running'
do
pipeline
.
update_bridge_status!
expect
(
bridge
.
reload
).
to
be_success
end
it
'can not update bridge status if is not active'
do
bridge
.
success!
expect
{
pipeline
.
update_bridge_status!
}.
not_to
change
{
bridge
.
status
}
end
end
end
end
context
'when an upstream status is a build'
do
context
'when an upstream status is a build'
do
...
@@ -3101,16 +3087,6 @@ describe Ci::Pipeline, :mailer do
...
@@ -3101,16 +3087,6 @@ describe Ci::Pipeline, :mailer do
expect
(
pipeline
.
source_bridge
).
to
be_nil
expect
(
pipeline
.
source_bridge
).
to
be_nil
end
end
end
end
describe
'#update_bridge_status!'
do
it
'tracks an ArgumentError and does not update upstream job status'
do
expect
(
Gitlab
::
ErrorTracking
)
.
to
receive
(
:track_exception
)
.
with
(
instance_of
(
ArgumentError
),
pipeline_id:
pipeline
.
id
)
pipeline
.
update_bridge_status!
end
end
end
end
end
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