From 18565fa149956f08985f1c54dfd6cc7780573796 Mon Sep 17 00:00:00 2001 From: rohanshah18 Date: Fri, 24 May 2024 11:05:08 -0400 Subject: [PATCH 1/3] prep for v1.1.1 release --- CHANGELOG.md | 3 +++ README.md | 6 +++--- gradle.properties | 2 +- src/main/java/io/pinecone/configs/PineconeConfig.java | 2 +- src/test/java/io/pinecone/PineconeBuilderTest.java | 5 +++-- src/test/java/io/pinecone/PineconeConfigTest.java | 10 ++++++---- 6 files changed, 17 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e37086af..f960465d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ [comment]: <> (When bumping [pc:VERSION_LATEST_RELEASE] create a new entry below) ### Unreleased version +### 1.1.1 +- Add exception cause + ### v1.1.0 - Add list vectors endpoint diff --git a/README.md b/README.md index ae9c332f..4ea31a3c 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Maven: io.pinecone pinecone-client - 1.1.0 + 1.1.1 ``` @@ -23,12 +23,12 @@ Maven: Gradle: ``` -implementation "io.pinecone:pinecone-client:1.1.0" +implementation "io.pinecone:pinecone-client:1.1.1" ``` [comment]: <> (^ [pc:VERSION_LATEST_RELEASE]) -Alternatively, you can use our standalone uberjar [pinecone-client-1.1.0-all.jar](https://repo1.maven.org/maven2/io/pinecone/pinecone-client/1.1.0/pinecone-client-1.1.0-all.jar), which bundles the pinecone +Alternatively, you can use our standalone uberjar [pinecone-client-1.1.1-all.jar](https://repo1.maven.org/maven2/io/pinecone/pinecone-client/1.1.1/pinecone-client-1.1.1-all.jar), which bundles the pinecone client and all dependencies together. You can include this in your classpath like you do with any 3rd party JAR without having to obtain the *pinecone-client* dependencies separately. diff --git a/gradle.properties b/gradle.properties index 212ac6a6..888747fe 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -pineconeClientVersion = 1.1.0 +pineconeClientVersion = 1.1.1 diff --git a/src/main/java/io/pinecone/configs/PineconeConfig.java b/src/main/java/io/pinecone/configs/PineconeConfig.java index e1539ef7..56883cba 100644 --- a/src/main/java/io/pinecone/configs/PineconeConfig.java +++ b/src/main/java/io/pinecone/configs/PineconeConfig.java @@ -176,7 +176,7 @@ public String getUserAgentGrpc() { } private String buildUserAgent(String clientId) { - String userAgent = String.format("lang=java; %s=%s", clientId, "v1.1.0"); + String userAgent = String.format("lang=java; %s=%s", clientId, "v1.1.1"); if (this.getSourceTag() != null && !this.getSourceTag().isEmpty()) { userAgent += "; source_tag=" + this.getSourceTag(); } diff --git a/src/test/java/io/pinecone/PineconeBuilderTest.java b/src/test/java/io/pinecone/PineconeBuilderTest.java index 6bdd0e12..197b238f 100644 --- a/src/test/java/io/pinecone/PineconeBuilderTest.java +++ b/src/test/java/io/pinecone/PineconeBuilderTest.java @@ -18,6 +18,7 @@ public class PineconeBuilderTest { private static final Gson gson = new Gson(); + private static final String pineconeClientVersion = "v1.1.1"; private static AbstractMap.SimpleEntry buildMockCallAndClient(ResponseBody response) throws IOException { Response mockResponse = new Response.Builder() @@ -79,7 +80,7 @@ public void PineconeWithOkHttpClientAndUserAgent() throws IOException { assertEquals(expectedIndex, index); verify(mockClient, times(1)).newCall(requestCaptor.capture()); - assertEquals("lang=java; pineconeClientVersion=v1.1.0", requestCaptor.getValue().header("User-Agent")); + assertEquals("lang=java; pineconeClientVersion=" + pineconeClientVersion, requestCaptor.getValue().header("User-Agent")); } @Test @@ -105,6 +106,6 @@ public void PineconeWithSourceTag() throws IOException { assertEquals(expectedIndex, index); verify(mockClient, times(1)).newCall(requestCaptor.capture()); - assertEquals("lang=java; pineconeClientVersion=v1.1.0; source_tag=testsourcetag", requestCaptor.getValue().header("User-Agent")); + assertEquals("lang=java; pineconeClientVersion=" + pineconeClientVersion + "; source_tag=testsourcetag", requestCaptor.getValue().header("User-Agent")); } } \ No newline at end of file diff --git a/src/test/java/io/pinecone/PineconeConfigTest.java b/src/test/java/io/pinecone/PineconeConfigTest.java index 574aff4a..2777aafc 100644 --- a/src/test/java/io/pinecone/PineconeConfigTest.java +++ b/src/test/java/io/pinecone/PineconeConfigTest.java @@ -8,6 +8,8 @@ public class PineconeConfigTest { + private static final String pineconeClientVersion = "v1.1.1"; + @Test public void testValidateWithNullApiKey() { try { @@ -28,26 +30,26 @@ public void testValidateWithEmptyApiKey() { @Test public void testGetUserAgent() { PineconeConfig config = new PineconeConfig("testApiKey"); - assertEquals(config.getUserAgent(), "lang=java; pineconeClientVersion=v1.1.0"); + assertEquals(config.getUserAgent(), "lang=java; pineconeClientVersion=" + pineconeClientVersion); } @Test public void testGetUserAgentGrpc() { PineconeConfig config = new PineconeConfig("testApiKey"); - assertEquals(config.getUserAgentGrpc(), "lang=java; pineconeClientVersion[grpc]=v1.1.0"); + assertEquals(config.getUserAgentGrpc(), "lang=java; pineconeClientVersion[grpc]=" + pineconeClientVersion); } @Test public void testGetUserAgentWithSourceTag() { PineconeConfig config = new PineconeConfig("testApiKey"); config.setSourceTag("testSourceTag"); - assertEquals(config.getUserAgent(), "lang=java; pineconeClientVersion=v1.1.0; source_tag=testsourcetag"); + assertEquals(config.getUserAgent(), "lang=java; pineconeClientVersion=" + pineconeClientVersion + "; source_tag=testsourcetag"); } @Test public void testGetUserAgentGrpcWithSourceTag() { PineconeConfig config = new PineconeConfig("testApiKey"); config.setSourceTag("testSourceTag"); - assertEquals(config.getUserAgentGrpc(), "lang=java; pineconeClientVersion[grpc]=v1.1.0; source_tag=testsourcetag"); + assertEquals(config.getUserAgentGrpc(), "lang=java; pineconeClientVersion[grpc]=" + pineconeClientVersion + "; source_tag=testsourcetag"); } @Test From ce2572970de562dbf2595d9dd962983edaabf1ed Mon Sep 17 00:00:00 2001 From: rohanshah18 Date: Fri, 24 May 2024 11:31:50 -0400 Subject: [PATCH 2/3] remove --info flag --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0432d67b..78be9afd 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -79,7 +79,7 @@ jobs: run: gradle clean build - name: Run integration tests - run: gradle integrationTest --info + run: gradle integrationTest env: PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} PINECONE_ENVIRONMENT: ${{ secrets.PINECONE_ENVIRONMENT }} From 9ae1c04251b6e2a15e0787f97d043959a4155a17 Mon Sep 17 00:00:00 2001 From: rohanshah18 Date: Fri, 24 May 2024 12:49:25 -0400 Subject: [PATCH 3/3] release v1.2.0 --- CHANGELOG.md | 5 +++-- README.md | 6 +++--- gradle.properties | 2 +- src/main/java/io/pinecone/configs/PineconeConfig.java | 2 +- src/test/java/io/pinecone/PineconeBuilderTest.java | 2 +- src/test/java/io/pinecone/PineconeConfigTest.java | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f960465d..00b3a9c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,9 @@ [comment]: <> (When bumping [pc:VERSION_LATEST_RELEASE] create a new entry below) ### Unreleased version -### 1.1.1 -- Add exception cause +### 1.2.0 +- Add list with pagination and limit but without prefix +- Add exception cause ### v1.1.0 - Add list vectors endpoint diff --git a/README.md b/README.md index 4ea31a3c..611efcd1 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Maven: io.pinecone pinecone-client - 1.1.1 + 1.2.0 ``` @@ -23,12 +23,12 @@ Maven: Gradle: ``` -implementation "io.pinecone:pinecone-client:1.1.1" +implementation "io.pinecone:pinecone-client:1.2.0" ``` [comment]: <> (^ [pc:VERSION_LATEST_RELEASE]) -Alternatively, you can use our standalone uberjar [pinecone-client-1.1.1-all.jar](https://repo1.maven.org/maven2/io/pinecone/pinecone-client/1.1.1/pinecone-client-1.1.1-all.jar), which bundles the pinecone +Alternatively, you can use our standalone uberjar [pinecone-client-1.2.0-all.jar](https://repo1.maven.org/maven2/io/pinecone/pinecone-client/1.2.0/pinecone-client-1.2.0-all.jar), which bundles the pinecone client and all dependencies together. You can include this in your classpath like you do with any 3rd party JAR without having to obtain the *pinecone-client* dependencies separately. diff --git a/gradle.properties b/gradle.properties index 888747fe..dfadac26 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -pineconeClientVersion = 1.1.1 +pineconeClientVersion = 1.2.0 diff --git a/src/main/java/io/pinecone/configs/PineconeConfig.java b/src/main/java/io/pinecone/configs/PineconeConfig.java index 56883cba..0694f7e7 100644 --- a/src/main/java/io/pinecone/configs/PineconeConfig.java +++ b/src/main/java/io/pinecone/configs/PineconeConfig.java @@ -176,7 +176,7 @@ public String getUserAgentGrpc() { } private String buildUserAgent(String clientId) { - String userAgent = String.format("lang=java; %s=%s", clientId, "v1.1.1"); + String userAgent = String.format("lang=java; %s=%s", clientId, "v1.2.0"); if (this.getSourceTag() != null && !this.getSourceTag().isEmpty()) { userAgent += "; source_tag=" + this.getSourceTag(); } diff --git a/src/test/java/io/pinecone/PineconeBuilderTest.java b/src/test/java/io/pinecone/PineconeBuilderTest.java index 197b238f..681409e8 100644 --- a/src/test/java/io/pinecone/PineconeBuilderTest.java +++ b/src/test/java/io/pinecone/PineconeBuilderTest.java @@ -18,7 +18,7 @@ public class PineconeBuilderTest { private static final Gson gson = new Gson(); - private static final String pineconeClientVersion = "v1.1.1"; + private static final String pineconeClientVersion = "v1.2.0"; private static AbstractMap.SimpleEntry buildMockCallAndClient(ResponseBody response) throws IOException { Response mockResponse = new Response.Builder() diff --git a/src/test/java/io/pinecone/PineconeConfigTest.java b/src/test/java/io/pinecone/PineconeConfigTest.java index 2777aafc..698d7d04 100644 --- a/src/test/java/io/pinecone/PineconeConfigTest.java +++ b/src/test/java/io/pinecone/PineconeConfigTest.java @@ -8,7 +8,7 @@ public class PineconeConfigTest { - private static final String pineconeClientVersion = "v1.1.1"; + private static final String pineconeClientVersion = "v1.2.0"; @Test public void testValidateWithNullApiKey() {