replicate: Don't forward partitioning hint to other Gitaly nodes
Part of #5764 (closed)
A partitioning hint can be provided via metadata in gRPC requests. This value is the relative path of a repository which Gitaly should partition with the target repository of the request. The hint is extracted by middleware and then forwarded onto the partition manager.
In the ReplicateRepository RPC, a Gitaly node will communicate with another Gitaly node to replicate the repository data. It forwards the incoming gRPC metadata directly as the outgoing metadata to the other Gitaly node. When a partition hint is present in the metadata, this is conveyed to the other Gitaly node too. This is undesirable because the relative path in the hint is not designed to be acted upon by downstream Gitaly nodes.
Add a helper function to remove the partitioning hint from an incoming gRPC context, and invoke it in the ReplicateRepository RPC before contacting other Gitaly nodes.