ci: pin grpcio-tools==1.81.1 to fix proto stub drift (red CI badge on main)#121
Merged
Merged
Conversation
The 'proto stub drift' CI job (and thus the README CI badge on main) was red because grpcio-tools was installed from a loose range (>=1.65,<2.0) in both requirements.txt and ci.yaml. The range floated from 1.81.0 (when the stubs were committed) up to 1.81.1, and the generated stub embeds the generator version as GRPC_GENERATED_VERSION, so regeneration produced a one-line diff (1.81.0 -> 1.81.1) that failed the byte-identical drift gate. Fix (durable): pin grpcio-tools to the EXACT version in both places and regenerate the committed stub so it matches. Future generator bumps now require a deliberate pin change. - requirements.txt: grpcio-tools>=1.65,<2.0 -> ==1.81.1 (+ rationale comment) - .github/workflows/ci.yaml: install grpcio-tools==1.81.1 (+ rationale comment) - runtime_pb2_grpc.py: GRPC_GENERATED_VERSION 1.81.0 -> 1.81.1 (regenerated) Verified locally: drift check (git diff --exit-code after regenerate) PASSES; proto stubs import OK. Co-authored-by: FluffyAIcode <FluffyAIcode@users.noreply.github.com>
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
main's CI badge is red because theproto stub driftjob fails. Root cause is a loose dependency pin, not a real contract change:GRPC_GENERATED_VERSION = '1.81.0'(inference_engine/server/proto_gen/kakeya/v1/runtime_pb2_grpc.py).requirements.txtandci.yamlinstallgrpcio-tools>=1.65,<2.0(loose).1.81.1, so CI's regeneration produced a one-line diff and the byte-identical drift gate failed:It is pre-existing (present on the #117 and GPU-beta merges) and purely cosmetic — a version-string bump in auto-generated code.
Fix (durable — approach 2)
Pin the stub generator to an exact version in both places and regenerate the committed stub to match. Future bumps now require a deliberate pin change instead of silently breaking CI.
requirements.txt:grpcio-tools>=1.65,<2.0→grpcio-tools==1.81.1(+ rationale comment). Runtimegrpciostays a range (correct for runtime)..github/workflows/ci.yaml: installgrpcio-tools==1.81.1(+ rationale comment).runtime_pb2_grpc.py: regenerated →GRPC_GENERATED_VERSION = '1.81.1'(the only byte change).Testing
bash scripts/regenerate_proto_stubs.shthengit diff --exit-code -- inference_engine/server/proto_gen/ sdks/typescript/src/proto_gen/→ clean (reproduces the exact CI gate; committed == regenerated @ 1.81.1).python3 -c "import …runtime_pb2, …runtime_pb2_grpc"→ proto stubs import OK.