Skip to content

Commit

Permalink
Avoid random grpcio log messages from grpcio >= 1.65 (#290)
Browse files Browse the repository at this point in the history
## Problem

Avoid the random log messages printed by newer versions of grpcio:

```
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1736518320.409980 62387854 init.cc:229] grpc_wait_for_shutdown_with_timeout() timed out.
```

Upstream GH issue: grpc/grpc#37222

This mentions it is fixed in protobuf v27.3; however that's numbered in
python land as 5.27 and hence is a new major version which the
'pinecone' Python package is not compatible with:

```
❯ poetry show protobuf
 name         : protobuf
 version      : 4.25.5
 description  :

required by
 - google-api-core >=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<6.0.0.dev0
 - googleapis-common-protos >=3.20.2,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<6.0.0.dev0
 - pinecone >=4.25,<5.0
 - proto-plus >=3.19.0,<6.0.0dev
 - protoc-gen-openapiv2 >=4.21.0
```

## Solution

Downgrade to grpcio 1.64. We will have to wait until pinecone supports
5.27 before allowing a newer version of grpcio / protobuf.

## Type of Change

- [x] Bug fix (non-breaking change which fixes an issue)
  • Loading branch information
daverigby authored Jan 10, 2025
1 parent 8a0d4f5 commit fc6e538
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 60 deletions.
109 changes: 50 additions & 59 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ python = "^3.11"
locust = "^2.32.5"
pandas = "^2.2.3"
google-cloud-storage = "^2.18.2"
grpcio = "^1.66.1"
grpcio = "1.64.1"
pyarrow = "^18.0.0"
pinecone = {version = "^5.0", extras = ["grpc"]}
tabulate = "^0.9.0"
Expand Down

0 comments on commit fc6e538

Please sign in to comment.