-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor to improve user-experience and delete support for endpoint construction for data plane operations using projectId, env, and indexName #72
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I feel like we're trending in the right direction here. I definitely think we should look at removing PineconeClient
entirely if that's not something we expect users to interact with. Is our intention to maintain the existing config classes to allow easier backwards compatibility on upgrading to v1.0.0?
I've left some thoughts in PineconeConnection
, please let me know if there's anything you'd like to discuss.
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:
Type of Change
Refactored existing codebase so no new functionalities were added.
Test Plan
Describe specific steps for validating this change.