Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2018-03-19 16:17:46 +0300
committerTomasz Maczukin <tomasz@maczukin.pl>2018-03-20 18:49:33 +0300
commita61761908fde2f032f00f07d0ccc479177db6d3f (patch)
treea8f4f1463fc0a2f2efd373208c2f2f58eab67f6b /app
parentea5221aeb358ef6c349cfa09b9c6993bd7bd027d (diff)
Prevent auto-retry AccessDenied error from stopping transition to failed
Diffstat (limited to 'app')
-rw-r--r--app/models/ci/build.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index f8a3600e863..4edcfd02157 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -140,7 +140,11 @@ module Ci
next if build.retries_max.zero?
if build.retries_count < build.retries_max
- Ci::Build.retry(build, build.user)
+ begin
+ Ci::Build.retry(build, build.user)
+ rescue Gitlab::Access::AccessDeniedError => ex
+ Rails.logger.error "Unable to auto-retry job #{build.id}: #{ex}"
+ end
end
end