From dcd85fc7f014c64fe4bf2924dd5c7e985afe14ff Mon Sep 17 00:00:00 2001 From: Rohan Shah Date: Wed, 27 Sep 2023 17:26:47 -0400 Subject: [PATCH] Update gRPC version to 1.58.0 (#26) * Update grpc version to 1.58.0 * run integration tests and clean up --- build.gradle | 2 +- src/main/java/io/pinecone/PineconeConnection.java | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 606d871e..933e138c 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ repositories { jcenter() } -def grpcVersion = '1.53.0' +def grpcVersion = '1.58.0' dependencies { api "io.grpc:grpc-protobuf:${grpcVersion}" diff --git a/src/main/java/io/pinecone/PineconeConnection.java b/src/main/java/io/pinecone/PineconeConnection.java index 00e5f41b..d38d10e5 100644 --- a/src/main/java/io/pinecone/PineconeConnection.java +++ b/src/main/java/io/pinecone/PineconeConnection.java @@ -46,9 +46,12 @@ public PineconeConnection(PineconeClientConfig clientConfig, PineconeConnectionC : buildChannel(clientConfig, connectionConfig); channel.notifyWhenStateChanged(channel.getState(false), this::onConnectivityStateChanged); Metadata metadata = assembleMetadata(clientConfig, connectionConfig); - blockingStub = applyDefaultBlockingStubConfig( - MetadataUtils.attachHeaders(VectorServiceGrpc.newBlockingStub(channel), metadata)); - asyncStub = MetadataUtils.attachHeaders(VectorServiceGrpc.newStub(channel), metadata); + blockingStub = VectorServiceGrpc + .newBlockingStub(channel) + .withInterceptors(MetadataUtils.newAttachHeadersInterceptor(metadata)); + asyncStub = VectorServiceGrpc + .newStub(channel) + .withInterceptors(MetadataUtils.newAttachHeadersInterceptor(metadata)); logger.debug("created new PineconeConnection for channel: {}", channel); }