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
Jérome Perrin
gitlab-ce
Commits
7bda1030
Commit
7bda1030
authored
Jun 20, 2017
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send gitaly token to workhorse when needed
parent
76bafc00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
lib/gitlab/workhorse.rb
lib/gitlab/workhorse.rb
+8
-3
spec/lib/gitlab/workhorse_spec.rb
spec/lib/gitlab/workhorse_spec.rb
+5
-1
No files found.
lib/gitlab/workhorse.rb
View file @
7bda1030
...
...
@@ -26,7 +26,10 @@ module Gitlab
}
if
Gitlab
.
config
.
gitaly
.
enabled
address
=
Gitlab
::
GitalyClient
.
address
(
project
.
repository_storage
)
server
=
{
address:
Gitlab
::
GitalyClient
.
address
(
project
.
repository_storage
),
token:
Gitlab
::
GitalyClient
.
token
(
project
.
repository_storage
),
}
params
[
:Repository
]
=
repository
.
gitaly_repository
.
to_h
feature_enabled
=
case
action
.
to_s
...
...
@@ -39,8 +42,10 @@ module Gitlab
else
raise
"Unsupported action:
#{
action
}
"
end
params
[
:GitalyAddress
]
=
address
if
feature_enabled
if
feature_enabled
params
[
:GitalyAddress
]
=
server
[
:address
]
# This field will be deprecated
params
[
:GitalyServer
]
=
server
end
end
params
...
...
spec/lib/gitlab/workhorse_spec.rb
View file @
7bda1030
...
...
@@ -202,7 +202,11 @@ describe Gitlab::Workhorse, lib: true do
context
'when Gitaly is enabled'
do
let
(
:gitaly_params
)
do
{
GitalyAddress
:
Gitlab
::
GitalyClient
.
address
(
'default'
)
GitalyAddress
:
Gitlab
::
GitalyClient
.
address
(
'default'
),
GitalyServer
:
{
address:
Gitlab
::
GitalyClient
.
address
(
'default'
),
token:
Gitlab
::
GitalyClient
.
token
(
'default'
)
}
}
end
...
...
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