summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2017-04-04 15:41:50 +0200
committerJacob Vosmaer <jacob@gitlab.com>2017-04-04 15:41:50 +0200
commitca94d20013b9f4480d0ba4d9fc831b6021877f03 (patch)
treee09330177d0823aaad1604f7bac014e0102a1da2
parentc5dae616c25960a1176f4fb75728a5a8ca22c75a (diff)
downloadgitlab-ce-ca94d20013b9f4480d0ba4d9fc831b6021877f03.tar.gz
Pass GitalyAddress to workhorse
-rw-r--r--lib/gitlab/workhorse.rb7
-rw-r--r--spec/lib/gitlab/workhorse_spec.rb4
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb
index d0637f8b394..6f70c47c006 100644
--- a/lib/gitlab/workhorse.rb
+++ b/lib/gitlab/workhorse.rb
@@ -44,7 +44,12 @@ module Gitlab
raise "Unsupported action: #{action}"
end
- params[:GitalySocketPath] = URI(address).path if feature_enabled
+ if feature_enabled
+ params[:GitalyAddress] = address
+ # TODO deprecate GitalySocketPath once GITLAB_WORKHORSE_VERSION points
+ # to a version that supports GitalyAddress.
+ params[:GitalySocketPath] = URI(address).path
+ end
end
params
diff --git a/spec/lib/gitlab/workhorse_spec.rb b/spec/lib/gitlab/workhorse_spec.rb
index 3bd2a3238fe..4e84a99e388 100644
--- a/spec/lib/gitlab/workhorse_spec.rb
+++ b/spec/lib/gitlab/workhorse_spec.rb
@@ -188,8 +188,10 @@ describe Gitlab::Workhorse, lib: true do
context 'when Gitaly is enabled' do
let(:gitaly_params) do
+ address = Gitlab::GitalyClient.get_address('default')
{
- GitalySocketPath: URI(Gitlab::GitalyClient.get_address('default')).path,
+ GitalySocketPath: URI(address).path,
+ GitalyAddress: address,
}
end