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
472955cc
Commit
472955cc
authored
Jul 30, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
6f9038ea
d92a8c1a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
changelogs/unreleased/sh-fix-gitaly-access-control.yml
changelogs/unreleased/sh-fix-gitaly-access-control.yml
+5
-0
lib/gitlab/gitaly_client.rb
lib/gitlab/gitaly_client.rb
+1
-1
spec/lib/gitlab/gitaly_client_spec.rb
spec/lib/gitlab/gitaly_client_spec.rb
+10
-0
No files found.
changelogs/unreleased/sh-fix-gitaly-access-control.yml
0 → 100644
View file @
472955cc
---
title
:
Fix exception handling in Gitaly autodetection
merge_request
:
31285
author
:
type
:
fixed
lib/gitlab/gitaly_client.rb
View file @
472955cc
...
...
@@ -413,7 +413,7 @@ module Gitlab
metadata_file
=
File
.
read
(
storage_metadata_file_path
(
storage
))
metadata_hash
=
JSON
.
parse
(
metadata_file
)
metadata_hash
[
'gitaly_filesystem_id'
]
rescue
Errno
::
ENOENT
,
Errno
::
ACCES
S
,
JSON
::
ParserError
rescue
Errno
::
ENOENT
,
Errno
::
EACCE
S
,
JSON
::
ParserError
nil
end
...
...
spec/lib/gitlab/gitaly_client_spec.rb
View file @
472955cc
...
...
@@ -17,6 +17,16 @@ describe Gitlab::GitalyClient do
})
end
describe
'.filesystem_id_from_disk'
do
it
'catches errors'
do
[
Errno
::
ENOENT
,
Errno
::
EACCES
,
JSON
::
ParserError
].
each
do
|
error
|
allow
(
File
).
to
receive
(
:read
).
with
(
described_class
.
storage_metadata_file_path
(
'default'
)).
and_raise
(
error
)
expect
(
described_class
.
filesystem_id_from_disk
(
'default'
)).
to
be_nil
end
end
end
describe
'.stub_class'
do
it
'returns the gRPC health check stub'
do
expect
(
described_class
.
stub_class
(
:health_check
)).
to
eq
(
::
Grpc
::
Health
::
V1
::
Health
::
Stub
)
...
...
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