-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor to improve user-experience and delete support for endpoint c…
…onstruction for data plane operations using projectId, env, and indexName (#72) ## Problem Currently the user has to create multiple config objects before they can call data plane operations. ## Solution I have added PineconeConnection() constructor that takes apiKey and indexName as input parameters, and internally creates the config objects to provide a connection object directly without having the need to create the config objects. I have also refactored the classes especially PineconeConnection class as a part of this PR. Lastly, the endpoint construction for gRPC calls using projectName, indexName, and environment is discontinued, and will only use host parameter to get the endpoint. The host parameter is obtained by calling describeIndex(). Refactored the following: 1. Removed PineconePackageInfo since it wasn't used anywhere 2. Moved PineconeClient, PineconeConnection, PineconeConnectionConfig, and PineconeClientConfig under configs. I'll eventually like to cut down all dependencies to PineconeClient class and delete it but currently some of the test classes do rely on it and we can take care of it in future PR's. Also I'll like to keep PineconeClient out of clients package since I don't want users to think that it's one of the top level clients that will be useful to them. 3. Moved PineconeControlPlaneClient, PineconeBlockingDataPlaneClient, and PineconeFutureDataPlaneClient under clients package. 4. Removed ServerSideTimeout field from PineconeClientConfig since the values were not set correctly. ## 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) Refactored existing codebase so no new functionalities were added. ## Test Plan Describe specific steps for validating this change.
- Loading branch information
1 parent
31036f0
commit 5d087cc
Showing
19 changed files
with
84 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
src/integration/java/io/pinecone/integration/controlPlane/pod/CollectionErrorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
src/integration/java/io/pinecone/integration/controlPlane/pod/ConfigureIndexTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...n/java/io/pinecone/integration/controlPlane/pod/CreateDescribeListAndDeleteIndexTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...io/pinecone/integration/controlPlane/serverless/CreateDescribeListAndDeleteIndexTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/integration/java/io/pinecone/integration/dataPlane/QueryErrorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
src/integration/java/io/pinecone/integration/dataPlane/UpsertAndDescribeIndexStatsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...cone/PineconeBlockingDataPlaneClient.java → ...ents/PineconeBlockingDataPlaneClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../pinecone/PineconeControlPlaneClient.java → ...e/clients/PineconeControlPlaneClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...necone/PineconeFutureDataPlaneClient.java → ...lients/PineconeFutureDataPlaneClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...main/java/io/pinecone/PineconeClient.java → ...a/io/pinecone/configs/PineconeClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package io.pinecone; | ||
package io.pinecone.configs; | ||
|
||
import io.pinecone.exceptions.PineconeValidationException; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.