Regenerate protobuf bindings for protobuf 4.x / Ruby 3.4#10
Open
jarredhawkins wants to merge 2 commits into
Open
Regenerate protobuf bindings for protobuf 4.x / Ruby 3.4#10jarredhawkins wants to merge 2 commits into
jarredhawkins wants to merge 2 commits into
Conversation
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]>
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 generated
*_pb.rbfiles 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 atruby < 3.4, so the Found Ruby 3.4 upgrade forces protobuf 4.x — which fails to load these bindings.What
temporal/*message + service stubs withgrpc-tools 1.81.1→ emits theadd_serialized_fileformat protobuf 4.x requires (no behavior change; same proto submodule SHA4c2f6a2).lib/gen/dependencies/gogoproto/gogo_pb.rb— the temporal protos import gogo annotations and the modern codegen emits arequirefor it, so it must be generated (the old codegen silently inlined/stripped it).Makefile:PROTO_ROOTproto/temporal→protosomake protoreproduces the full generation (including the gogoproto dependency).Validation
Pointed internal repo at this branch on Ruby 3.4.8 / protobuf 4.35.1:
Co-Authored-By: Claude Opus 4.8 [email protected]