diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-02-06 14:16:12 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-02-06 14:16:12 +0100 |
commit | c30f4421749efc08051436496f2aec3269132412 (patch) | |
tree | a7ab34f785318f4efcb0cba8061d6cd40a5abcfd /app/services | |
parent | 708059bd9a8f6509b95f7d63c69ce4106d23d6a0 (diff) | |
download | gitlab-ce-c30f4421749efc08051436496f2aec3269132412.tar.gz |
Improve exceptions messages in code creating stages
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/ci/ensure_stage_service.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/services/ci/ensure_stage_service.rb b/app/services/ci/ensure_stage_service.rb index 775b3668c1d..87f19b333de 100644 --- a/app/services/ci/ensure_stage_service.rb +++ b/app/services/ci/ensure_stage_service.rb @@ -28,9 +28,11 @@ module Ci find_stage || create_stage rescue ActiveRecord::RecordNotUnique retry if (attempts -= 1) > 0 + raise EnsureStageError, <<~EOS - Possible bug in the database load balancing detected! - Please fix me! + We failed to find or create a unique pipeline stage after 2 retries. + This should never happen and is most likely the result of a bug in + the database load balancing code. EOS end |