Loading
feat(proto): publish Go protobuf stubs for workhorse integration
Summary
Adds a root-level Go module so Workhorse can import GKG protobuf stubs as a normal Go dependency, matching the pattern used by Gitaly (gitlab.com/gitlab-org/gitaly/v18).
- Root
go.modwith module pathgitlab.com/gitlab-org/orbit/knowledge-graph - Generated gRPC stubs in
gkgpb/, generated fromcrates/gkg-server/proto/gkg.proto - Uses
protoc -Mflag to setgo_packagewithout modifying the source proto - Semantic-release
vX.Y.Ztags work directly as Go module versions (no prefixed tags needed) - Pinned protoc-gen-go v1.36.11 and protoc-gen-go-grpc v1.6.1 for reproducible builds
- CI job
check-go-protovalidates stubs on proto/Go changes and release tags
How Workhorse imports it
After the next release tag (e.g., v0.19.0):
require gitlab.com/gitlab-org/orbit/knowledge-graph v0.19.0import gkgpb "gitlab.com/gitlab-org/orbit/knowledge-graph/gkgpb"Regenerating stubs
mise run proto:go
mise run proto:go:checkPrior art
- Gitaly: single root go.mod (
gitlab.com/gitlab-org/gitaly/v18), proto stubs atproto/go/gitalypb/as sub-package, plainvX.Y.Ztags - ai-assist: sub-directory go.mod (
clients/gopb/), no sub-module tags, consumers use pseudo-versions -- not ideal
This MR follows the Gitaly pattern for a clean, tag-based Go module.
Related: #349 (closed), #348 (closed) Depends on: !730 (merged) (ADR 008)
Edited by Michael Angelo Rivera