-
Notifications
You must be signed in to change notification settings - Fork 13
Add index tags #169
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
Add index tags #169
Conversation
@@ -70,13 +69,6 @@ public void testSyncListEndpoint() throws InterruptedException { | |||
listResponseWithPaginationNoPrefix1.getPagination().getNext() | |||
); | |||
assertEquals(listResponseWithPaginationNoPrefix2.getVectorsList().size(), 2); | |||
ListResponse listResponseWithPaginationNoPrefix3 = indexConnection.list( |
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.
Remove extra checks that are failing consistently in integration tests
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.
Why are they failing?
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.
The total number of vectors in the custom namespace ("example-namespace") is 4. When listResponseWithPaginationNoPrefix1
returns 2 vectors and includes a pagination token pointing to the remaining vector IDs, these are then returned as part of listResponseWithPaginationNoPrefix2
, which has a limit of 2. Since there are no more vector IDs left, no pagination token will be returned in the response of listResponseWithPaginationNoPrefix2
. As a result, the assertion on line #79 will fail with the error message: "Pagination token cannot be null or empty." Similarly, this issue will also occur in the asynchronous test.
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.
LGTM, just left a few comments. Nice work!
// Create serverless index with deletion protection enabled | ||
controlPlaneClient.createServerlessIndex(indexName, "cosine", 3, "aws", "us-west-2", DeletionProtection.ENABLED); | ||
controlPlaneClient.createServerlessIndex(indexName, "cosine", 3, "aws", "us-west-2", DeletionProtection.ENABLED, tags); |
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.
You may want to add an assertion for the tags that are applied to the index since we're doing that for DeletionProtection
.
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.
Good point, added the additional assertions
@@ -70,13 +69,6 @@ public void testSyncListEndpoint() throws InterruptedException { | |||
listResponseWithPaginationNoPrefix1.getPagination().getNext() | |||
); | |||
assertEquals(listResponseWithPaginationNoPrefix2.getVectorsList().size(), 2); | |||
ListResponse listResponseWithPaginationNoPrefix3 = indexConnection.list( |
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.
Why are they failing?
Problem
Add support for Index tags.
Solution
Index tags can be passed as a Map<String, String> to the following operations:
When configuring tags, following are the special cases:
Type of Change
Test Plan
Updated integration tests for all 4 operations.