Skip to content
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 + small updates to generated code #317

Merged
merged 7 commits into from
Dec 18, 2024
Merged

Add Index tags + small updates to generated code #317

merged 7 commits into from
Dec 18, 2024

Conversation

aulorbe
Copy link
Collaborator

@aulorbe aulorbe commented Dec 16, 2024

Problem

This is a late addition to the current version of our client to incorporate Index Tags, as introduced in the 2024-10 spec.

Once merged, this will be a minor release of the current version.

Note: This PR also contains some generated code that was added into the 2024-10 spec after the latest code gen on main.

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)
  • None of the above: (explain here)

Test Plan

CI passes w/new tests and additions to old tests.


@aulorbe aulorbe marked this pull request as ready for review December 17, 2024 00:56
tags: {
example: 'tag',
},
deletionProtection: 'disabled', // Redundant, but for example purposes
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added deletionProtection to this test just b/c I noticed it was missing while doing index tag stuffs

Copy link
Contributor

@austin-denoble austin-denoble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for getting this worked in!

README.md Outdated
@@ -344,6 +346,31 @@ await pc.configureIndex('deletion-protected-index', {
});
```

#### Create or configure an index with index tags

You can configure both serverless and pod indexes with [tags](https://docs.pinecone.io/guides/indexes/tag-an-index).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'd mention "create" and "configure" explicitly here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +352 to +353
Indexes can hold an arbitrary number of tags outlining metadata
you would like attached to the index object itself, such as team ownership, project, or any other relevant information.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know you've linked to the docs, but do you think it's worth demonstrating how to perform a tag deletion here? With tag: "" - empty string I mean.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I can add that!

@@ -35,6 +35,7 @@ const CreateIndexOptionsProperties: CreateIndexOptionsType[] = [
'deletionProtection',
'waitUntilReady',
'suppressConflicts',
'tags',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be worth adding any createIndex unit test coverage for this? I know you're integration testing as well, so maybe not.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't hurt

@aulorbe aulorbe changed the title Add Index tags Add Index tags + small updates to generated code Dec 18, 2024
@aulorbe aulorbe merged commit b6855c8 into main Dec 18, 2024
3 checks passed
@aulorbe aulorbe deleted the index-tags branch December 18, 2024 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants