Repository navigation
chore(proto): pin protoc-gen-connect-go by commit - #679
Merged
Merged
Conversation
docker-agent
reviewed
Oct 8, 2026
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
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>
Benehiko
force-pushed
the
chore/pin-connect-go
branch
from
October 8, 2026 09:33
c369ec5 to
b8fc558
Compare
docker-agent
reviewed
Oct 8, 2026
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
Benehiko
enabled auto-merge
October 8, 2026 11:45
joe0BAB
reviewed
Oct 8, 2026
| - paths=source_relative | ||
| - default_api_level=API_OPAQUE | ||
| - remote: buf.build/connectrpc/go | ||
| # Installed in the Dockerfile, pinned by commit via CONNECT_GO_COMMIT in the Makefile. |
joe0BAB
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The proto generate check (
proto-check.yml) is failing on every PR, e.g. #677 and #678, even though none of them touch the protos. It last passed onmainon Oct 6.buf.gen.yamlpinsbuf.build/protocolbuffers/go:v1.36.7, but usesbuf.build/connectrpc/gowithout a version, so every run takes the latest plugin from the Buf registry. A newer release generates a different API: handlers and clients take*v1.GetSecretsRequestinstead of*connect.Request[v1.GetSecretsRequest],connect.NewErrortakes a string, and theconnect.IsAtLeastVersion1_13_0assertion is gone. The regeneratedapi.connect.gofiles then differ from the committed ones and the check fails.What
Pin
protoc-gen-connect-goby commit. A Buf remote plugin can only be pinned by version and an integerrevision(buf v1.56.0 has no digest field forremote:plugins), so it now runs as a local plugin built from a fixed commit:Makefile:CONNECT_GO_COMMIT := ad9598763248cc291416c2e956ecd50d128a19bf, thev1.19.1tag and theconnectrpc.com/connectversion every module already requires. Passed to the build next toBUF_VERSION.Dockerfile: the proto generate stage runsgo install connectrpc.com/connect/cmd/protoc-gen-connect-go@${CONNECT_GO_COMMIT}. Go resolves the commit to its module version and checks it against the checksum database. The install is only in the generate stage, soproto-lintdoesn't pay for it.buf.gen.yaml:remote: buf.build/connectrpc/gobecomeslocal: protoc-gen-connect-go.No generated code changes. Moving to the new generator API is a separate, deliberate upgrade alongside the
connectrpc.com/connectdependency.The protobuf-go plugin (
remote: …/protocolbuffers/go:v1.36.7) andbufitself (v1.56.0) are still pinned by version.Tests
DOCKER_BUILD_ARGS="--no-cache" make proto-generatelocally, the same build CI runs:ad95987…connectrpc.com/connect v1.19.1; no changes underx/apimain)*connect/api.connect.gofiles change, matching the CI failure