From b8fc558d26180bb12264dc59cbc185a0f6dd03e8 Mon Sep 17 00:00:00 2001 From: Alano Terblanche <18033717+Benehiko@users.noreply.github.com> Date: Thu, 8 Oct 2026 11:20:15 +0200 Subject: [PATCH] chore(proto): pin protoc-gen-connect-go by commit buf.gen.yaml used buf.build/connectrpc/go without a version, so every run took the latest plugin from the Buf registry. A newer release generates a different API (no connect.Request wrappers, no IsAtLeastVersion1_13_0 assertion), which made the proto generate check fail on every branch. Remote plugins can only be pinned by version and revision, not by digest, so run protoc-gen-connect-go as a local plugin instead: the proto generate stage installs it with go install at commit ad9598763248cc291416c2e956ecd50d128a19bf (v1.19.1, the connectrpc.com/connect version the modules require), set by CONNECT_GO_COMMIT in the Makefile. This reproduces the committed code exactly. Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com> --- Dockerfile | 5 +++++ Makefile | 4 ++++ buf.gen.yaml | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5e432e84..b8705d31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -197,6 +197,11 @@ RUN --mount=type=bind,target=. \ buf lint FROM proto-base AS do-proto-generate +ARG CONNECT_GO_COMMIT +RUN --mount=type=cache,target=/root/.cache/go-build \ + --mount=type=cache,target=/go/pkg/mod \ + --mount=type=tmpfs,target=/go/src/ \ + go install "connectrpc.com/connect/cmd/protoc-gen-connect-go@${CONNECT_GO_COMMIT}" WORKDIR /src RUN mkdir -p /generate/out RUN --mount=type=bind,target=.,rw <