Skip to content

Commit

Permalink
Update changelogs, sdk version, and user-agent for v0.8.0 release (#68)
Browse files Browse the repository at this point in the history
## Problem

Release control plane operations for java sdk and cleanup configure
index test

## Solution

Update changelogs, sdk version, and user-agent for v0.8.0 release
Configure index test had an incorrect condition and the catch() wasn't
throwing the exception.

## Type of Change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update
- [ ] Infrastructure change (CI configs, etc)
- [ ] Non-code change (docs, etc)
- [X] None of the above: (explain here)

## Test Plan

Ran integration tests and published the jar locally to test all
operations in a maven project
  • Loading branch information
rohanshah18 authored Feb 22, 2024
1 parent a301439 commit 1bde139
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 22 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

[comment]: <> (When bumping [pc:VERSION_LATEST_RELEASE] create a new entry below)
### Unreleased version
### v0.8.0
- Add support for control plane operations for serverless indexes
- Add support for collections for pod indexes

### v0.7.4
- Add source_collection and support to ignore newly added fields to the response body for describeIndex's indexMetaDatabase object

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ Maven:
<dependency>
<groupId>io.pinecone</groupId>
<artifactId>pinecone-client</artifactId>
<version>0.7.4</version>
<version>0.8.0</version>
</dependency>
```

[comment]: <> (^ [pc:VERSION_LATEST_RELEASE])

Gradle:
```
implementation "io.pinecone:pinecone-client:0.7.4"
implementation "io.pinecone:pinecone-client:0.8.0"
```

[comment]: <> (^ [pc:VERSION_LATEST_RELEASE])

Alternatively, you can use our standalone uberjar [pinecone-client-0.7.4-all.jar](https://repo1.maven.org/maven2/io/pinecone/pinecone-client/0.7.4/pinecone-client-0.7.4-all.jar), which bundles the pinecone client and all dependencies together inside a single jar. You can include this on your classpath like any 3rd party JAR without having to obtain the *pinecone-client* dependencies separately.
Alternatively, you can use our standalone uberjar [pinecone-client-0.8.0-all.jar](https://repo1.maven.org/maven2/io/pinecone/pinecone-client/0.8.0/pinecone-client-0.8.0-all.jar), which bundles the pinecone client and all dependencies together inside a single jar. You can include this on your classpath like any 3rd party JAR without having to obtain the *pinecone-client* dependencies separately.

[comment]: <> (^ [pc:VERSION_LATEST_RELEASE])

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pineconeClientVersion = 0.7.4
pineconeClientVersion = 0.8.0
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import io.pinecone.PineconeControlPlaneClient;
import io.pinecone.exceptions.PineconeException;
import io.pinecone.exceptions.PineconeForbiddenException;
import io.pinecone.integration.dataplane.PineconeClientLiveIntegTest;
import io.pinecone.exceptions.PineconeBadRequestException;
import io.pinecone.exceptions.PineconeNotFoundException;
import org.junit.jupiter.api.*;
Expand Down Expand Up @@ -111,7 +110,7 @@ public void changingBasePodType() {
} catch (PineconeBadRequestException badRequestException) {
assert(badRequestException.getMessage().contains("Bad request: Cannot change pod type."));
} catch (Exception exception) {
logger.error(exception.getLocalizedMessage());
throw new PineconeException("Test failed: " + exception.getLocalizedMessage());
}
}

Expand All @@ -135,22 +134,8 @@ public void sizeIncrease() throws InterruptedException {
assert (podSpec != null);
assertEquals(podSpec.getPodType(), "p1.x2");
});

// Attempt to scale down
pod = new ConfigureIndexRequestSpecPod().podType("p1.x1");
spec = new ConfigureIndexRequestSpec().pod(pod);
configureIndexRequest = new ConfigureIndexRequest().spec(spec);
controlPlaneClient.configureIndex(indexName, configureIndexRequest);

// Get the index description to verify the new pod type
assertWithRetry(() -> {
PodSpec podSpec = controlPlaneClient.describeIndex(indexName).getSpec().getPod();
assert (podSpec != null);
assertEquals(podSpec.getPodType(), "p1.x1");
});

} catch (Exception exception) {
logger.error(exception.getLocalizedMessage());
throw new PineconeException("Test failed: " + exception.getLocalizedMessage());
} finally {
// Delete this index since it'll be unused for future tests
controlPlaneClient.deleteIndex(indexName);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/pinecone/PineconeClientConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private String maskedApiKey() {
}

public String getUserAgent() {
String userAgentLanguage = "lang=java; pineconeClientVersion = v0.7.4";
String userAgentLanguage = "lang=java; pineconeClientVersion = v0.8.0";
return (this.getUsageContext() != null) ?
userAgentLanguage + "; usageContext=" + this.getUsageContext() : userAgentLanguage;
}
Expand Down

0 comments on commit 1bde139

Please sign in to comment.