Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running hatch run development raises google Protobuf VersionError #100

Open
spastorclovr opened this issue Dec 17, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@spastorclovr
Copy link

What happened?

I cannot run hatch run development

Error is

google.protobuf.runtime_version.VersionError: Detected incompatible Protobuf Gencode/Runtime versions when loading grpc_reflection/v1alpha/reflection.proto: gencode 5.28.1 runtime 5.27.2. Runtime version cannot be older than the linked gencode version. See Protobuf version guarantees at https://protobuf.dev/support/cross-version-runtime-guarantee.

How can we reproduce it?

This is the error message we get 👇

 Traceback (most recent call last):
  File "/home/spastor/projects/current/clovrlabs/repos/chainprint/infra-experiment/crossplane/platform/function-meta/function/main.py", line 4, in <module>
    from crossplane.function import logging, runtime
  File "/home/spastor/projects/current/clovrlabs/repos/chainprint/infra-experiment/crossplane/platform/function-meta/.venv-default/lib/python3.12/site-packages/crossplane/function/runtime.py", line 21, in <module>
    from grpc_reflection.v1alpha import reflection
  File "/home/spastor/projects/current/clovrlabs/repos/chainprint/infra-experiment/crossplane/platform/function-meta/.venv-default/lib/python3.12/site-packages/grpc_reflection/v1alpha/reflection.py", line 19, in <module>
    from grpc_reflection.v1alpha import reflection_pb2 as _reflection_pb2
  File "/home/spastor/projects/current/clovrlabs/repos/chainprint/infra-experiment/crossplane/platform/function-meta/.venv-default/lib/python3.12/site-packages/grpc_reflection/v1alpha/reflection_pb2.py", line 12, in <module>
    _runtime_version.ValidateProtobufRuntimeVersion(
  File "/home/spastor/projects/current/clovrlabs/repos/chainprint/infra-experiment/crossplane/platform/function-meta/.venv-default/lib/python3.12/site-packages/google/protobuf/runtime_version.py", line 86, in ValidateProtobufRuntimeVersion
    raise VersionError(
google.protobuf.runtime_version.VersionError: Detected incompatible Protobuf Gencode/Runtime versions when loading grpc_reflection/v1alpha/reflection.proto: gencode 5.28.1 runtime 5.27.2. Runtime version cannot be older than the linked gencode version. See Protobuf version guarantees at https://protobuf.dev/support/cross-version-runtime-guarantee.
### What environment did it happen in?
Function version: Latest

Note that :

  • Entering the virtual env
    then
  • pip install --upgrade protobuf`

Makes hatch run development work.

(It seems that the dependencies set on Crossplane-sdk regarding protobuf seems lower than the gencode on this template ?)

@spastorclovr spastorclovr added the bug Something isn't working label Dec 17, 2024
@hsmade
Copy link

hsmade commented Dec 18, 2024

It's this commit that broke this: c5d7321

@spastorclovr
Copy link
Author

Very true. It works when reverting dependencies of grpcio to 1.67.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants