(fix)build: disable proto rule generation, rely on checked-in .pb.go for go-code compatibility#293
Merged
roychying merged 3 commits intoJul 2, 2026
Conversation
added 2 commits
July 1, 2026 18:44
|
chenghan.ying seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
gsturges
approved these changes
Jul 2, 2026
sbalabanov
approved these changes
Jul 2, 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?
We want the smoothest DX for consuming the OSS submitqueue repo in go-code. Today go-code's
go_repositoryusesbuild_file_generation = "on", so its Gazelle regenerates BUILD files for the vendored repo. This causes conflicts and mismatches, and every version bump risks new patching.The root issue is that OSS carries proto types twice: as checked-in
.pb.goinprotopb/, and as Bazel-generated code viago_proto_libraryinproto/. Removing the Bazel proto rules in favor of the checked-in.pb.gofixes several things at once:gazelle:resolveworkarounds. Collapsing to a single source removes that whole class of conflict.go build/go get(including OSS users) can only use the checked-in .pb.go, so that path must work regardless. The Bazel proto rules are a redundant second path that serves no one the checked-in files don't already serve.What?
Disable Gazelle proto rule generation and remove all proto compilation rules, relying solely on checked-in
.pb.gofiles.# gazelle:proto disable_globalto prevent Gazelle from regenerating proto rules on future make gazelle runsgazelle:resolve directivesthat are no longer neededproto_library,go_proto_library, and aliasgo_libraryrulesexports_filesformake protocodegen (tool/proto/BUILD.bazel)Test Plan
make build- passmake test- 65/65 unit tests pass (integration/e2e tests fail due to Docker dependency, pre-existing)bazel build //tool/proto:generated- proto codegen still worksmake gazelle- zero warnings, no duplicate-importpath ambiguity--override_repositorypointing at this branch: all 71 targets build, all 20 tests pass across stovepipe, submitqueue/gateway, and submitqueue/orchestratorIssue