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

Implement IndexTags #88

Merged
merged 2 commits into from
Dec 13, 2024
Merged

Implement IndexTags #88

merged 2 commits into from
Dec 13, 2024

Conversation

austin-denoble
Copy link
Contributor

@austin-denoble austin-denoble commented Dec 12, 2024

Problem

Index tags are a feature which was included in the 2024-10 API specification, but was not implemented in the SDK interface.

Solution

  • Add new IndexTags type to models.go. This just represents map[string]string, lining up with the generated type.
  • Update CreateServerlessIndexRequest, CreatePodIndexRequest, and ConfigureIndexParams to allow passing IndexTags optionally.
  • Update integration test setup / teardown to support working with tags. Add a new test method to exercise validating tags, and updating them through ConfigureIndex.

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 Integration Tests should pass - these create serverless & pod indexes with tags, and then a test checks the tags and updates them as a part of the integration test suite.

To work with tags directly in Go:

	indexTags := IndexTags{"test1": "test-tag-1", "test2": "test-tag-2"}
	serverlessIdx, err := in.CreateServerlessIndex(ctx, &CreateServerlessIndexRequest{
		Name:      "test-index",
		Dimension: uint32(5),
		Metric:    Cosine,
		Region:    "us-east-1",
		Cloud:     "aws",
		Tags:      &indexTags,
	})

… ConfigureIndex, add new integration tests to validate behavior
@austin-denoble austin-denoble merged commit d406377 into main Dec 13, 2024
4 checks passed
@austin-denoble austin-denoble deleted the adenoble/implement-index-tags branch December 13, 2024 02:48
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