Skip to content

git: Convert internal fetches to use sidechannel

With commit b5722938 (Merge branch 'jv-ssh-sidechannel-2' into 'master', 2022-01-18) we have introduced a new RPC which allows us to serve SSH-based fetches with a sidechannel. Instead of using gRPC as a means for communicating between client and server we instead use a simple protocol based on pktlines, which allows us to avoid the overhead introduced by gRPC message serialization and deserialization.

For now, use of the sidechannel is only enabled for external clients which come in via gitlab-shell. This commit adds the necessary infra to also use the sidechannel for internal fetches, which most importantly includes the RPCs ReplicateRepository, FetchSourceBranch and a subset of RPCs in the OperationService which know to fetch from a remote repository.

The new code is guarded by a feature flag.

Changelog: performance

Closes #4042 (closed)

Merge request reports