Add Workhorse-side Gitaly proxy pieces
What does this MR do and why?
This adds the Workhorse side of the Gitaly proxy: a WebSocket transport layer, metrics, package docs, goleak setup and round-trip tests. It builds on the exported Gitaly proxy package that master already requires. Route wiring, preauthorization and session integration come in the follow-up.
I also bumped Gitaly to v19.5.0-rc3, so importing the proxy no longer pulls in the Sentry SDK. That raises the Go floor to 1.26, so I dropped Go 1.25 from the Workhorse CI matrices.
References
Related to gitlab-org/orbit/knowledge-graph#1252
Gitaly package: gitaly!9243 (merged) (merged)
Follow-up route: !253431
Screenshots or screen recordings
Not applicable: no UI.
How to set up and validate locally
cd workhorse
go build ./...
go vet ./internal/gitalyproxy/...
golangci-lint run ./internal/gitalyproxy/...
go test -race ./internal/gitalyproxy/...
make verifyMR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Agent context - package import, dependency delta, and chained follow-up
Scope
This MR adds workhorse/internal/gitalyproxy with:
- A WebSocket
net.Connadapter and a one-connection listener. Unit tests cover framing, deadlines, close handling, byte counters and concurrency. - Prometheus metrics for the proxy, with a smoke test that registers every collector.
- Package docs and goleak test setup.
- A round-trip gRPC test through Gitaly's exported proxy, using
proxy.NewCodec,proxy.TransparentHandler,proxy.StreamPeeker,proxy.StreamParametersandproxy.Destinationover Workhorse's WebSocket connection and listener.
The package itself is additive and makes no depguard changes.
Dependencies
gitlab.com/gitlab-org/gitaly/v19goes fromv19.5.0-rc2tov19.5.0-rc3.rc3is the lowest tag that contains gitaly!9300 (merged).rc2doesn't have it,rc42does.- With
rc3, importing the proxy package no longer addsgithub.com/getsentry/sentry-gotogo.mod. - The bump forces the other
go.mod/go.sumchanges. Thegodirective moves to 1.26.0, and we get newerlabkit,labkit/v2,x/*and otel modules, plus a few new indirect ones (arrow-go,goccy/go-json,lz4,xxh3,cpuid). All of it comes fromgo getandgo mod tidy. - Go floor: I dropped
"1.25"from the three Workhorse matrices in.gitlab/ci/workhorse.gitlab-ci.ymland movedworkhorse/.tool-versionstogolang 1.26.9. - Binary size:
gitlab-workhorsegrows by about 8% (94.2 MB to 101.8 MB with-trimpath), mostly fromarrow-go, which comes in throughazblob. - Lint:
logging.gonow setsFormatinstead of the deprecatedUseTextFormat. JSON still leaves it empty, soGITLAB_LOG_FORMATkeeps its precedence.chainDirectorannotates the deprecatedReverseProxy.Directoruses, since moving toRewritechanges header handling and fits better in a follow-up.
Work boundary: follow-up MR
The chained route MR (!253431) handles route wiring, preauthorization, session integration, HTTP/2 draining and runtime setup. This MR is the standalone package addition, and the follow-up adapts the route, lifecycle and contract logic to use it.