Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
c30f4421
Commit
c30f4421
authored
7 years ago
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve exceptions messages in code creating stages
parent
708059bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
app/services/ci/ensure_stage_service.rb
app/services/ci/ensure_stage_service.rb
+4
-2
db/post_migrate/20180119121225_remove_redundant_pipeline_stages.rb
...igrate/20180119121225_remove_redundant_pipeline_stages.rb
+4
-1
No files found.
app/services/ci/ensure_stage_service.rb
View file @
c30f4421
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
db/post_migrate/20180119121225_remove_redundant_pipeline_stages.rb
View file @
c30f4421
...
...
@@ -11,9 +11,12 @@ class RemoveRedundantPipelineStages < ActiveRecord::Migration
add_unique_index!
rescue
ActiveRecord
::
RecordNotUnique
retry
if
(
attempts
-=
1
)
>
0
raise
StandardError
,
<<~
EOS
Failed to add an unique index to ci_stages, despite retrying the
migration 100 times. See gitlab-org/gitlab-ce!16580.
migration 100 times.
See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16580.
EOS
end
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment