Add glId, glUser, glRepo, glProtocol to PackObjectsRequest
In order gain visibility into which user or repository is responsible for concurrent pack objects processes, !4596 (merged) adds functionality that will log these metrics. However, the PackObjectsHookWithSidechannel
does not get user_id
and username
in the context. The reason is because it's gitaly-hooks
that makes an RPC call.
user_id
and username
get injected into the context by workhorse and gitlab-shell, so PostUploadPackWithSidechannel
and SSHUploadPackWithSidechannel
have access to these values through gRPC metadata. But, when gitaly-hooks
gets called, we don't pass these values in.
This MR adds functionality to pass these values through the GITALY_HOOKS_PAYLOAD
env var to gitaly-hooks
, which then can unmarshal this payload and pass in user_id, username, and protocol to the PackObjectsHookWithSidechannel
RPC call.