[proto tooling] add hermetic protoc compilation managed by bazel#201
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Bazel-managed, hermetic protobuf compilation for the repo’s Go/YARPC stubs, and updates developer workflows to use Bazel as the protoc + plugin source of truth.
Changes:
- Introduces a custom Starlark rule (
go_proto_generated_files) that runsprotocfrom the registered proto toolchain with pinned Go/gRPC/YARPC plugins. - Adds Bazel targets under
//tool/prototo generate the repo’s gateway/orchestrator protos for both submitqueue and stovepipe. - Updates
make proto(and docs) to generate via Bazel and copy results back into the checked-in*/protopbdirectories.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tool/proto/proto_codegen.bzl |
New Starlark rule wrapping hermetic protoc execution for Go/grpc/yarpc outputs. |
tool/proto/BUILD.bazel |
Adds concrete generation targets for the four existing proto entrypoints and a generated filegroup. |
submitqueue/orchestrator/proto/BUILD.bazel |
Exports orchestrator.proto to allow //tool/proto to depend on the source file directly. |
submitqueue/gateway/proto/BUILD.bazel |
Exports gateway.proto to allow //tool/proto to depend on the source file directly. |
stovepipe/orchestrator/proto/BUILD.bazel |
Exports orchestrator.proto to allow //tool/proto to depend on the source file directly. |
stovepipe/gateway/proto/BUILD.bazel |
Exports gateway.proto to allow //tool/proto to depend on the source file directly. |
MODULE.bazel |
Pins a toolchains_protoc protoc version and adds a bzlmod Go module entry to obtain protoc-gen-go-grpc. |
Makefile |
Replaces direct protoc invocations with bazel build //tool/proto:generated + copy-back + goimports formatting. |
doc/howto/DEVELOPMENT.md |
Updates local setup + troubleshooting to reflect Bazel-provided protoc/plugins rather than local installs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
behinddwalls
approved these changes
Jun 5, 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.
Summary
Bazel-ify the entire codegen toolchain so a single
make protoproduces byte-identical output on any host.Previously,
make protowas dependent on host-installed versions of protoc + plugins which led to different output when run on different machine.Test Plan
✅
make fmt && make proto && make build && make test && make e2e-test✅
make proto<-- no changes to generated source✅ Modify .proto -> call
make proto-> see expected updates to allprotopb/*filesIssues
T3-CODE-204