Skip to content

Use YARPC protobuf v2 codegen#204

Merged
behinddwalls merged 2 commits into
mainfrom
wua/fix-yarpc-codegen
Jun 5, 2026
Merged

Use YARPC protobuf v2 codegen#204
behinddwalls merged 2 commits into
mainfrom
wua/fix-yarpc-codegen

Conversation

@albertywu
Copy link
Copy Markdown
Contributor

@albertywu albertywu commented Jun 5, 2026

Summary

The previous yarpc transport code was compiled for gogo/protobuf, which is incompatible with proto v2 shapes + structs.

This PR fixes the yarpc transport code to use proto v2.

Before Example:

gateway.pb.go <-- [✅ proto v2] shapes + structs
gateway_grpc.pb.go <-- [✅ proto v2] grpc transport
gateway.pb.yarpc.go <-- [❌ gogo/protobuf] yarpc transport; should be using proto v2 instead of gogo

After Example:

gateway.pb.go <-- [✅ proto v2] shapes + structs
gateway_grpc.pb.go <-- [✅ proto v2] grpc transport
gateway.pb.yarpc.go <-- [✅ proto v2] yarpc transport

Test Plan

make fmt && make build && make test && make e2e-test

Copilot AI review requested due to automatic review settings June 5, 2026 03:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the repository’s YARPC protobuf stub generation to the YARPC protobuf v2 codegen/tooling, updating generated client/server glue to use go.uber.org/yarpc/encoding/protobuf/v2 and removing the legacy gogo/protobuf dependency from the build configuration.

Changes:

  • Switch Bazel proto codegen to use protoc-gen-yarpc-go-v2 and --yarpc-go-v2_{out,opt} flags.
  • Regenerate YARPC .pb.yarpc.go stubs to use YARPC protobuf v2 APIs and google.golang.org/protobuf/proto.
  • Update Bazel deps / module deps and Go module deps to drop gogo/protobuf and depend on the Google protobuf module.

Reviewed changes

Copilot reviewed 7 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tool/proto/proto_codegen.bzl Updates Bazel proto generation to invoke the YARPC protobuf v2 plugin and flags.
submitqueue/orchestrator/protopb/orchestrator.pb.yarpc.go Regenerated YARPC stubs to use encoding/protobuf/v2 APIs and Google protobuf proto.Message.
submitqueue/orchestrator/protopb/BUILD.bazel Updates Go library deps to match regenerated stubs (adds google protobuf + YARPC protobuf v2).
submitqueue/gateway/protopb/gateway.pb.yarpc.go Regenerated YARPC stubs to use encoding/protobuf/v2 APIs and Google protobuf proto.Message.
submitqueue/gateway/protopb/BUILD.bazel Updates Go library deps to match regenerated stubs (adds google protobuf + YARPC protobuf v2).
stovepipe/orchestrator/protopb/orchestrator.pb.yarpc.go Regenerated YARPC stubs to use encoding/protobuf/v2 APIs and Google protobuf proto.Message.
stovepipe/orchestrator/protopb/BUILD.bazel Updates Go library deps to match regenerated stubs (adds google protobuf + YARPC protobuf v2).
stovepipe/gateway/protopb/gateway.pb.yarpc.go Regenerated YARPC stubs to use encoding/protobuf/v2 APIs and Google protobuf proto.Message.
stovepipe/gateway/protopb/BUILD.bazel Updates Go library deps to match regenerated stubs (adds google protobuf + YARPC protobuf v2).
MODULE.bazel Removes Bazel module repo usage for com_github_gogo_protobuf.
go.mod Removes github.com/gogo/protobuf (and related indirects) from module requirements.
go.sum Updates sums to reflect dependency graph changes after removing direct gogo usage.
Files not reviewed (4)
  • stovepipe/gateway/protopb/gateway.pb.yarpc.go: Language not supported
  • stovepipe/orchestrator/protopb/orchestrator.pb.yarpc.go: Language not supported
  • submitqueue/gateway/protopb/gateway.pb.yarpc.go: Language not supported
  • submitqueue/orchestrator/protopb/orchestrator.pb.yarpc.go: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread submitqueue/orchestrator/protopb/orchestrator.pb.yarpc.go
Comment thread submitqueue/gateway/protopb/gateway.pb.yarpc.go
Comment thread stovepipe/orchestrator/protopb/orchestrator.pb.yarpc.go
Comment thread stovepipe/gateway/protopb/gateway.pb.yarpc.go
@albertywu albertywu marked this pull request as ready for review June 5, 2026 03:18
@albertywu albertywu requested review from a team, behinddwalls and sbalabanov as code owners June 5, 2026 03:18
@behinddwalls behinddwalls added this pull request to the merge queue Jun 5, 2026
Merged via the queue into main with commit 35e2613 Jun 5, 2026
15 checks passed
@behinddwalls behinddwalls deleted the wua/fix-yarpc-codegen branch June 5, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants