diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2019-01-18 11:30:43 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-01-18 11:30:43 +0000 |
commit | 20de391b7b2b1322297b5e09c5dbcca062b113a3 (patch) | |
tree | 1fb7e69f0fb5d759791b9314a086d66c4e6eda39 /app | |
parent | 75ead9a4f34f392b3595afb7a15de173c1f980b8 (diff) | |
parent | 91c1dc578eba70417b05ef0edd961f0717e10c43 (diff) | |
download | gitlab-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.rb | 9 |
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| |