Repository navigation
fix(datamesh): pin protobuf gencode to the 5.29 runtime line - #26
Merged
Merged
Conversation
The committed inventory stubs were regenerated by buf's unpinned remote plugins, which stamp a protobuf-6 gencode (Protobuf Python Version 7.36.2). Each service pins protobuf >=5.26,<6 (resolves to 5.29.6), and _pb2.py carries a runtime-version guard: the runtime must not be older than the gencode that stamped it. gencode 7.36.2 against runtime 5.29.6 raised VersionError at import, crash-looping inventory-service, order-service and graphql-gateway on OpenShift. Pin buf.gen.yaml to protocolbuffers/python:v29.3 (python protobuf 5.29.3) and grpc/python:v1.70.0 (last gRPC plugin on that line), and regenerate the committed stubs. gencode is now 5.29.3, which the 5.29.6 runtime accepts. Verified live on CRC: all three services Running 1/1; POST /orders drives the order->inventory gRPC check_stock (201 in-stock, 409 out-of-stock); the GraphQL gateway resolves Order.stock over gRPC.
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.
Problem
The committed inventory gRPC stubs (
services/{inventory-service,order-service,graphql-gateway}/gen/...) were regenerated bybuf's unpinned remote plugins, which stamp a protobuf-6 gencode (Protobuf Python Version: 7.36.2). Every service pinsprotobuf >=5.26,<6(resolves to 5.29.6), and each_pb2.pycarries a runtime-version guard: the runtime must not be older than the gencode that stamped it.gencode 7.36.2 against runtime 5.29.6 raises
VersionErrorat import, crash-looping inventory-service, order-service, and graphql-gateway on OpenShift/CRC (the other four services + infra were unaffected).Fix
Pin
buf.gen.yamlto the protobuf-5.29 line and regenerate the committed stubs:buf.build/protocolbuffers/python:v29.3→ python protobuf 5.29.3buf.build/grpc/python:v1.70.0→ last gRPC plugin on that linegencode is now 5.29.3, which the 5.29.6 runtime accepts. The architecture choice to commit stubs (CAP-013: no
buf/protocin the image) is unchanged; this only keeps the generator on the same protobuf line as the pinned runtime.Verified live on CRC
Running 1/1, noVersionError.POST /ordersdrives the order→inventory gRPCcheck_stock: 201 for in-stockWIDGET-001, 409 "insufficient stock (0 on hand)" forWIDGET-OOS.Order.stockover gRPC:{ sku: WIDGET-001, quantityOnHand: 50, available: true }.