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:
authorPavlo Strokov <pstrokov@gitlab.com>2020-09-30 14:17:23 +0300
committerPavlo Strokov <pstrokov@gitlab.com>2020-09-30 14:36:19 +0300
commit2ec2156a9d8e345d42d1bf093144a68735cc08ac (patch)
tree7d38a2125a2a7011ebe9a923f3507f4c5f1b534d /internal/helper/storage.go
parentbe4a37406e949983d483a4aabb7af0c0768e60af (diff)
Fix injection of gitaly servers info
InjectGitalyServers used `NewOutgoingContext` that completely overrides all outgoing metadata values, so no values except 'gitaly-servers' were passed with outgoing requests. Fixed by replacing `NewOutgoingContext` with `AppendToOutgoingContext` that appends passed values to existing metadata or crete it if not present. Closes: https://gitlab.com/gitlab-org/gitaly/-/issues/3158
Diffstat (limited to 'internal/helper/storage.go')
-rw-r--r--internal/helper/storage.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/helper/storage.go b/internal/helper/storage.go
index 523ca7ed6..0a465756f 100644
--- a/internal/helper/storage.go
+++ b/internal/helper/storage.go
@@ -74,5 +74,5 @@ func InjectGitalyServers(ctx context.Context, name, address, token string) (cont
return nil, err
}
- return metadata.NewOutgoingContext(ctx, metadata.Pairs("gitaly-servers", base64.StdEncoding.EncodeToString(gitalyServersJSON))), nil
+ return metadata.AppendToOutgoingContext(ctx, "gitaly-servers", base64.StdEncoding.EncodeToString(gitalyServersJSON)), nil
}