Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Cai <jcai@gitlab.com>2020-01-10 20:36:10 +0300
committerJohn Cai <jcai@gitlab.com>2020-01-14 01:27:27 +0300
commite1b12bdac5466823b852d1e20312bac0acddfbbb (patch)
tree1b6c9978f2728453a55c64afdecdd580b7ba9419
parentb44242703d8e1975bd2b64f09e816ea8349e8314 (diff)
Call client.Dial instead of grpc.Dial to handle tcp:// prefix
-rw-r--r--changelogs/unreleased/jc-fix-replication-address-error.yml5
-rw-r--r--internal/helper/storage.go3
2 files changed, 7 insertions, 1 deletions
diff --git a/changelogs/unreleased/jc-fix-replication-address-error.yml b/changelogs/unreleased/jc-fix-replication-address-error.yml
new file mode 100644
index 000000000..88daf6fac
--- /dev/null
+++ b/changelogs/unreleased/jc-fix-replication-address-error.yml
@@ -0,0 +1,5 @@
+---
+title: Call client.Dial in ClientConnection helper
+merge_request: 1749
+author:
+type: fixed
diff --git a/internal/helper/storage.go b/internal/helper/storage.go
index a4994f7d3..133a8a11d 100644
--- a/internal/helper/storage.go
+++ b/internal/helper/storage.go
@@ -7,6 +7,7 @@ import (
"fmt"
gitalyauth "gitlab.com/gitlab-org/gitaly/auth"
+ "gitlab.com/gitlab-org/gitaly/client"
"gitlab.com/gitlab-org/gitaly/internal/storage"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
@@ -80,7 +81,7 @@ func ClientConnection(ctx context.Context, storageName string) (*grpc.ClientConn
grpc.WithPerRPCCredentials(gitalyauth.RPCCredentials(repoStorageInfo["token"])),
}
- conn, err := grpc.Dial(repoStorageInfo["address"], connOpts...)
+ conn, err := client.Dial(repoStorageInfo["address"], connOpts)
if err != nil {
return nil, fmt.Errorf("could not dial source: %v", err)
}