**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:

```
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>
This commit is contained in:
Jesús Fernández 2025-04-10 12:00:31 +02:00
parent 9f55079121
commit 47180d9798
No known key found for this signature in database
GPG Key ID: F009C46F547D9A66
5 changed files with 13 additions and 10 deletions

View File

@ -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 @@ from google.protobuf.internal import builder as _builder
_runtime_version.ValidateProtobufRuntimeVersion(
_runtime_version.Domain.PUBLIC,
5,
27,
2,
29,
0,
'',
'crossplane/function/proto/v1/run_function.proto'
)

View File

@ -5,7 +5,7 @@ import warnings
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

View File

@ -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 @@ from google.protobuf.internal import builder as _builder
_runtime_version.ValidateProtobufRuntimeVersion(
_runtime_version.Domain.PUBLIC,
5,
27,
2,
29,
0,
'',
'crossplane/function/proto/v1beta1/run_function.proto'
)

View File

@ -5,7 +5,7 @@ import warnings
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

View File

@ -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"