diff options
author | Shinya Maeda <shinya@gitlab.com> | 2019-01-18 19:15:00 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2019-01-18 19:29:43 +0900 |
commit | 91c1dc578eba70417b05ef0edd961f0717e10c43 (patch) | |
tree | fee045a72d0978b1de4e0afb786e327fa950a1de /app | |
parent | 35c3cb7c480e812d3c6dcd8f8e2eb6c6a2da83b1 (diff) | |
download | gitlab-ce-91c1dc578eba70417b05ef0edd961f0717e10c43.tar.gz |
Fix runner eternal loop when update job result
Add spec
Add changelog
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| |