From 47180d97989107841f702dfeedd80d55a9a1d637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Fern=C3=A1ndez?= <7312236+fernandezcuesta@users.noreply.github.com> Date: Thu, 10 Apr 2025 12:00:31 +0200 Subject: [PATCH] **Summary:** Functions depending on function-sdk-python 0.6.0 are giving a segmentation fault. When (re)running the tests for this module, the following is shown: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` runtime_version.py:98: UserWarning: Protobuf gencode version 5.29.0 is exactly one major version older than the runtime version 6.30.2 at crossplane/function/proto/v1beta1/run_function.proto. Please update the gencode to avoid compatibility violations in the next runtime release. ``` Apparently when renovatebot opened a PR with a bump up on `protobuf` version, the major version change violated the constraint with `grpcio-tools`, which has the following dependency: ``` Collecting protobuf<6.0dev,>=5.26.1 (from grpcio-tools==1.71.0) ``` This makes incompatible to have different versions of protobuf for the `build` venv and the `generate` one. Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com> --- crossplane/function/proto/v1/run_function_pb2.py | 6 +++--- crossplane/function/proto/v1/run_function_pb2_grpc.py | 2 +- crossplane/function/proto/v1beta1/run_function_pb2.py | 6 +++--- crossplane/function/proto/v1beta1/run_function_pb2_grpc.py | 2 +- pyproject.toml | 7 +++++-- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/crossplane/function/proto/v1/run_function_pb2.py b/crossplane/function/proto/v1/run_function_pb2.py index 2c091b4..8a3947d 100644 --- a/crossplane/function/proto/v1/run_function_pb2.py +++ b/crossplane/function/proto/v1/run_function_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: crossplane/function/proto/v1/run_function.proto -# Protobuf Python Version: 5.27.2 +# Protobuf Python Version: 5.29.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 27, - 2, + 29, + 0, '', 'crossplane/function/proto/v1/run_function.proto' ) diff --git a/crossplane/function/proto/v1/run_function_pb2_grpc.py b/crossplane/function/proto/v1/run_function_pb2_grpc.py index 87c39cb..bc3a415 100644 --- a/crossplane/function/proto/v1/run_function_pb2_grpc.py +++ b/crossplane/function/proto/v1/run_function_pb2_grpc.py @@ -5,7 +5,7 @@ from crossplane.function.proto.v1 import run_function_pb2 as crossplane_dot_function_dot_proto_dot_v1_dot_run__function__pb2 -GRPC_GENERATED_VERSION = '1.67.0' +GRPC_GENERATED_VERSION = '1.71.0' GRPC_VERSION = grpc.__version__ _version_not_supported = False diff --git a/crossplane/function/proto/v1beta1/run_function_pb2.py b/crossplane/function/proto/v1beta1/run_function_pb2.py index 84b0ab3..dcd2eb0 100644 --- a/crossplane/function/proto/v1beta1/run_function_pb2.py +++ b/crossplane/function/proto/v1beta1/run_function_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: crossplane/function/proto/v1beta1/run_function.proto -# Protobuf Python Version: 5.27.2 +# Protobuf Python Version: 5.29.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 27, - 2, + 29, + 0, '', 'crossplane/function/proto/v1beta1/run_function.proto' ) diff --git a/crossplane/function/proto/v1beta1/run_function_pb2_grpc.py b/crossplane/function/proto/v1beta1/run_function_pb2_grpc.py index d8814f8..1bd4f5d 100644 --- a/crossplane/function/proto/v1beta1/run_function_pb2_grpc.py +++ b/crossplane/function/proto/v1beta1/run_function_pb2_grpc.py @@ -5,7 +5,7 @@ from crossplane.function.proto.v1beta1 import run_function_pb2 as crossplane_dot_function_dot_proto_dot_v1beta1_dot_run__function__pb2 -GRPC_GENERATED_VERSION = '1.67.0' +GRPC_GENERATED_VERSION = '1.71.0' GRPC_VERSION = grpc.__version__ _version_not_supported = False diff --git a/pyproject.toml b/pyproject.toml index cbdbba7..da0ff9c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ classifiers = [ dependencies = [ "grpcio==1.71.0", "grpcio-reflection==1.*", - "protobuf==6.30.2", + "protobuf==5.29.3", # Must be compatible with grpcio-tools. "pydantic==2.*", "structlog==25.*", ] @@ -45,7 +45,10 @@ dependencies = ["ipython==9.0.2"] type = "virtual" detached = true path = ".venv-generate" -dependencies = ["grpcio-tools==1.71.0"] +dependencies = [ + "grpcio-tools==1.71.0", + "protobuf==5.29.3", +] [tool.hatch.envs.generate.scripts] protoc = "python -m grpc_tools.protoc --proto_path=. --python_out=. --pyi_out=. --grpc_python_out=. crossplane/function/proto/v1beta1/run_function.proto crossplane/function/proto/v1/run_function.proto"