Skip to content

Regenerate protobuf bindings for protobuf 4.x / Ruby 3.4#10

Open
jarredhawkins wants to merge 2 commits into
found/mainfrom
found/protobuf-4
Open

Regenerate protobuf bindings for protobuf 4.x / Ruby 3.4#10
jarredhawkins wants to merge 2 commits into
found/mainfrom
found/protobuf-4

Conversation

@jarredhawkins

@jarredhawkins jarredhawkins commented Jun 16, 2026

Copy link
Copy Markdown

Why

The generated *_pb.rb files use the protobuf 3.x DSL (DescriptorPool.generated_pool.build do … end), which protobuf 4.x removed. protobuf 3.25.x (the last 3.x line) caps at ruby < 3.4, so the Found Ruby 3.4 upgrade forces protobuf 4.x — which fails to load these bindings.

What

  • Regenerated all 22 temporal/* message + service stubs with grpc-tools 1.81.1 → emits the add_serialized_file format protobuf 4.x requires (no behavior change; same proto submodule SHA 4c2f6a2).
  • Added lib/gen/dependencies/gogoproto/gogo_pb.rb — the temporal protos import gogo annotations and the modern codegen emits a require for it, so it must be generated (the old codegen silently inlined/stripped it).
  • Makefile: PROTO_ROOT proto/temporalproto so make proto reproduces the full generation (including the gogoproto dependency).

Validation

Pointed internal repo at this branch on Ruby 3.4.8 / protobuf 4.35.1:

  • Rails boots clean
  • protobuf encode/decode round-trips (incl. gogo-annotated messages)
  • temporal-caller specs pass

Co-Authored-By: Claude Opus 4.8 [email protected]

jarredhawkins and others added 2 commits June 16, 2026 18:42
The generated *_pb.rb files used the protobuf 3.x DSL
(DescriptorPool.generated_pool.build do ... end), which protobuf 4.x
removed. Regenerated all bindings with grpc-tools 1.81.1, which emits the
add_serialized_file format that protobuf 4.x requires.

- Regenerate all 22 temporal/* message + service stubs (build DSL -> add_serialized_file)
- Add lib/gen/dependencies/gogoproto/gogo_pb.rb (temporal protos import gogo
  annotations; the new codegen emits a require for it, so it must be generated)
- Makefile: PROTO_ROOT proto/temporal -> proto so `make proto` reproduces the
  full generation (including the gogoproto dependency)

Unblocks the Found api-backend Ruby 3.4.8 upgrade (protobuf 3.25.x caps at
ruby < 3.4).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
signal_with_start_workflow_execution referenced a bare WORKFLOW_ID_REUSE_POLICY
constant that only exists inside Serializer::WorkflowIdReusePolicy, so it raised
NameError whenever a workflow_id_reuse_policy was passed (pre-existing bug, not
related to the protobuf regen). Use the serializer, matching the three other
call sites in this file (start_workflow_execution, etc.).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
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.

1 participant