diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-04-04 15:48:24 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-04-04 15:48:24 +0000 |
commit | 20e3ed60935ca2b28cf1f632c5ce75f8dbac8e10 (patch) | |
tree | fc27d630899a54b7e90cd25ddbdb0e099c9fdf72 | |
parent | a46cca2e58643acd9d936442f98b12aaa84b9a26 (diff) | |
parent | ca94d20013b9f4480d0ba4d9fc831b6021877f03 (diff) | |
download | gitlab-ce-20e3ed60935ca2b28cf1f632c5ce75f8dbac8e10.tar.gz |
Merge branch 'workhorse-gitaly-address' into 'master'
Pass GitalyAddress to workhorse
See merge request !10447
-rw-r--r-- | lib/gitlab/workhorse.rb | 7 | ||||
-rw-r--r-- | spec/lib/gitlab/workhorse_spec.rb | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb index 09c3bd8fc9e..08011301d3c 100644 --- a/lib/gitlab/workhorse.rb +++ b/lib/gitlab/workhorse.rb @@ -45,7 +45,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 a5b7d9ad35f..9fbcb1fee69 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 |