Skip to content

ci: pin grpcio-tools==1.81.1 to fix proto stub drift (red CI badge on main)#121

Merged
FluffyAIcode merged 1 commit into
mainfrom
AgentMemory/fix-proto-stub-drift-2815
Jun 13, 2026
Merged

ci: pin grpcio-tools==1.81.1 to fix proto stub drift (red CI badge on main)#121
FluffyAIcode merged 1 commit into
mainfrom
AgentMemory/fix-proto-stub-drift-2815

Conversation

@FluffyAIcode

Copy link
Copy Markdown
Owner

Why

main's CI badge is red because the proto stub drift job fails. Root cause is a loose dependency pin, not a real contract change:

  • The committed Python stub embeds the generator version: GRPC_GENERATED_VERSION = '1.81.0' (inference_engine/server/proto_gen/kakeya/v1/runtime_pb2_grpc.py).
  • Both requirements.txt and ci.yaml install grpcio-tools>=1.65,<2.0 (loose).
  • That range floated up to 1.81.1, so CI's regeneration produced a one-line diff and the byte-identical drift gate failed:
-GRPC_GENERATED_VERSION = '1.81.0'
+GRPC_GENERATED_VERSION = '1.81.1'
##[error]Committed stubs are out of date with proto/.

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.0grpcio-tools==1.81.1 (+ rationale comment). Runtime grpcio stays a range (correct for runtime).
  • .github/workflows/ci.yaml: install grpcio-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.sh then git 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.
  • Diff is limited to the 3 files above; no proto contract / message-class changes.
Open in Web Open in Cursor 

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>
@FluffyAIcode FluffyAIcode marked this pull request as ready for review June 13, 2026 13:08
@FluffyAIcode FluffyAIcode merged commit 597aa2f into main Jun 13, 2026
8 checks passed
@FluffyAIcode FluffyAIcode deleted the AgentMemory/fix-proto-stub-drift-2815 branch June 13, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants