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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
b4445c7b
Commit
b4445c7b
authored
Jan 28, 2020
by
David Kim
Committed by
Mayra Cabrera
Jan 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow projects to be displayed when Gitaly fails to load pipeline status
parent
8240d01a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
changelogs/unreleased/34722-dashboard-projectscontroller-should-tolerate-single-gitaly-node-fai.yml
...ectscontroller-should-tolerate-single-gitaly-node-fai.yml
+6
-0
lib/gitlab/cache/ci/project_pipeline_status.rb
lib/gitlab/cache/ci/project_pipeline_status.rb
+4
-0
spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb
spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb
+18
-0
No files found.
changelogs/unreleased/34722-dashboard-projectscontroller-should-tolerate-single-gitaly-node-fai.yml
0 → 100644
View file @
b4445c7b
---
title
:
Fix pipeline status loading errors on project dashboard page caused by Gitaly
connection failures
merge_request
:
23378
author
:
type
:
fixed
lib/gitlab/cache/ci/project_pipeline_status.rb
View file @
b4445c7b
...
@@ -59,6 +59,10 @@ module Gitlab
...
@@ -59,6 +59,10 @@ module Gitlab
end
end
self
.
loaded
=
true
self
.
loaded
=
true
rescue
GRPC
::
Unavailable
,
GRPC
::
DeadlineExceeded
=>
e
# Handle Gitaly connection issues gracefully
Gitlab
::
ErrorTracking
.
track_exception
(
e
,
project_id:
project
.
id
)
end
end
def
load_from_project
def
load_from_project
...
...
spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb
View file @
b4445c7b
...
@@ -114,6 +114,24 @@ describe Gitlab::Cache::Ci::ProjectPipelineStatus, :clean_gitlab_redis_cache do
...
@@ -114,6 +114,24 @@ describe Gitlab::Cache::Ci::ProjectPipelineStatus, :clean_gitlab_redis_cache do
pipeline_status
.
load_status
pipeline_status
.
load_status
pipeline_status
.
load_status
pipeline_status
.
load_status
end
end
it
'handles Gitaly unavailable exceptions gracefully'
do
allow
(
pipeline_status
).
to
receive
(
:commit
).
and_raise
(
GRPC
::
Unavailable
)
expect
(
Gitlab
::
ErrorTracking
).
to
receive
(
:track_exception
).
with
(
an_instance_of
(
GRPC
::
Unavailable
),
project_id:
project
.
id
)
expect
{
pipeline_status
.
load_status
}.
not_to
raise_error
end
it
'handles Gitaly timeout exceptions gracefully'
do
allow
(
pipeline_status
).
to
receive
(
:commit
).
and_raise
(
GRPC
::
DeadlineExceeded
)
expect
(
Gitlab
::
ErrorTracking
).
to
receive
(
:track_exception
).
with
(
an_instance_of
(
GRPC
::
DeadlineExceeded
),
project_id:
project
.
id
)
expect
{
pipeline_status
.
load_status
}.
not_to
raise_error
end
end
end
describe
"#load_from_project"
,
:clean_gitlab_redis_cache
do
describe
"#load_from_project"
,
:clean_gitlab_redis_cache
do
...
...
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