fix(grpc): commit protobuf-5.x runtime files to source tree (#173) - #185
Merged
Conversation
The .gitignore globally ignored **/*_pb2.py and **/*_pb2_grpc.py, so the generated gRPC runtime files never made it into the source tag. The llm-service Dockerfile copies python/llm-service/ wholesale, so images built from a tagged source were missing the runtime files and crashed on import (workaround was 'make proto-local' before build). - Add explicit .gitignore negations for grpc_gen runtime files - Force-add the 14 nested protobuf-5.x _pb2.py/_pb2_grpc.py files - Regenerate orchestrator stubs to match committed proto (cache-token fields) - Remove stale flat protobuf-6.x duplicates (unimported, would crash 5.x runtime) Fixes #173
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
Fixes #173 — the gRPC runtime files (
*_pb2.py/*_pb2_grpc.py) for the Python llm-service were never committed, so source tags and images built from them were missing the runtime modules and crashed on import. The reported workaround was runningmake proto-localbefore building.Root cause
.gitignoreglobally ignores**/*_pb2.pyand**/*_pb2_grpc.py. The intended unignore forgrpc_gen/was left commented out, so the files stayed untracked. Thellm-serviceDockerfile copiespython/llm-service/wholesale, so any image CI builds from a tagged source ends up missing the runtime files.Changes
.gitignorenegations for thegrpc_genruntime files_pb2.py/_pb2_grpc.pyfiles (matches theprotobuf==5.xpin inrequirements.txt)cache_read_tokens,cache_creation_tokens,cache_creation_1h_tokens— already present inprotos/orchestrator/orchestrator.proto)grpc_gen.<pkg>layout, and 6.x-generated code would crash under the pinned 5.x runtime)Verification
_pb2.pyfiles report protobuf major version5grpc_genmodules import cleanly.protocontractNote for adopters
This fixes the source-build path. The one-command install pulls prebuilt images, so adopters get the fix only once the published
llm-serviceimage/tag is rebuilt from a tree containing this commit.