Commit bc1f926e authored by James Lopez's avatar James Lopez

Merge branch 'mc/feature/remove-ci_drop_bridge_on_downstream_errors-ff' into 'master'

Remove ci_drop_bridge_on_downstream_errors flag

Closes #207948

See merge request gitlab-org/gitlab!27906
parents a88493f3 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
......
...@@ -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
......
...@@ -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
......
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