summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-01-18 11:30:43 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2019-01-18 11:30:43 +0000
commit20de391b7b2b1322297b5e09c5dbcca062b113a3 (patch)
tree1fb7e69f0fb5d759791b9314a086d66c4e6eda39 /app
parent75ead9a4f34f392b3595afb7a15de173c1f980b8 (diff)
parent91c1dc578eba70417b05ef0edd961f0717e10c43 (diff)
downloadgitlab-ce-20de391b7b2b1322297b5e09c5dbcca062b113a3.tar.gz
Merge branch 'fix-runner-eternal-loop-when-update-job-result' into 'master'
Fix runner eternal loop when update job result Closes #56518 See merge request gitlab-org/gitlab-ce!24481
Diffstat (limited to 'app')
-rw-r--r--app/models/ci/build.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index dc6f8ae1a7f..cfdb3c0d719 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -224,8 +224,15 @@ module Ci
before_transition any => [:failed] do |build|
next unless build.project
+ next unless build.deployment
- build.deployment&.drop
+ begin
+ build.deployment.drop!
+ rescue => e
+ Gitlab::Sentry.track_exception(e, extra: { build_id: build.id })
+ end
+
+ true
end
after_transition any => [:failed] do |build|