Skip to content

Commit 0bee740

Browse files
ci: pin grpcio-tools==1.81.1 + regenerate stubs to fix proto stub drift
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>
1 parent 949bd97 commit 0bee740

3 files changed

Lines changed: 14 additions & 7 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,12 @@ jobs:
267267
- name: Install grpcio-tools
268268
run: |
269269
python -m pip install --upgrade pip
270-
# Pin the same grpcio-tools range as requirements.txt so the
271-
# stubs we regenerate match what production uses. If
272-
# grpcio-tools updates and starts producing different stub
273-
# bytes, this job catches it as a drift before merge.
274-
pip install 'grpcio>=1.65,<2.0' 'grpcio-tools>=1.65,<2.0'
270+
# Pin grpcio-tools to the EXACT version in requirements.txt. The
271+
# generated stub embeds the generator version
272+
# (GRPC_GENERATED_VERSION), so a loose range lets a patch release
273+
# float (e.g. 1.81.0 -> 1.81.1) and fail this drift gate on a
274+
# version string alone. Keep this in lockstep with requirements.txt.
275+
pip install 'grpcio>=1.65,<2.0' 'grpcio-tools==1.81.1'
275276
276277
- name: Set up Node.js (for ts-proto plugin)
277278
uses: actions/setup-node@v4

inference_engine/server/proto_gen/kakeya/v1/runtime_pb2_grpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from . import runtime_pb2 as kakeya_dot_v1_dot_runtime__pb2
77

8-
GRPC_GENERATED_VERSION = '1.81.0'
8+
GRPC_GENERATED_VERSION = '1.81.1'
99
GRPC_VERSION = grpc.__version__
1010
_version_not_supported = False
1111

requirements.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,14 @@ prometheus-client>=0.20,<1.0
5151
# file because (a) we want CI to be able to drift-check the
5252
# committed stubs, and (b) the install footprint is small and there
5353
# is no separate dev-requirements file in this project today.
54+
#
55+
# grpcio-tools is PINNED to an EXACT version: the generated stub embeds
56+
# the generator version as `GRPC_GENERATED_VERSION = '<grpcio-tools ver>'`,
57+
# so a loose range lets a patch release (e.g. 1.81.0 -> 1.81.1) silently
58+
# change the committed bytes and fail the `proto stub drift` CI gate.
59+
# Bump this pin (and re-run scripts/regenerate_proto_stubs.sh) deliberately.
5460
grpcio>=1.65,<2.0
55-
grpcio-tools>=1.65,<2.0
61+
grpcio-tools==1.81.1
5662

5763
# K2.A KakeyaLattice K/V cache compression (ADR 0008 §11.11).
5864
# Pinned to >= 1.5 (the tested Mac M4 release; see PR-K2.A.0

0 commit comments

Comments
 (0)