Skip to content
This repository was archived by the owner on May 7, 2024. It is now read-only.

Support metadata index configuration - #24

Merged
biosugar0 merged 5 commits into
biosugar0:mainfrom
msnidal:feature/index-metadata-config
Aug 31, 2023
Merged

biosugar0 merged 5 commits into
biosugar0:mainfrom
msnidal:feature/index-metadata-config

Conversation

@msnidal

@msnidal msnidal commented Jul 16, 2023

Copy link
Copy Markdown
Contributor

Hello, I need to use selective metadata field indexing (see here for more details), so I added support here. I did my best to add some tests and documentation but let me know if you think anything is missing. Thank you for the project!

@biosugar0

Copy link
Copy Markdown
Owner

@msnidal Thank you for your contribution! There are a few things we need to address though.

Firstly, it's important to note that the documentation is auto-generated.
Therefore, you can use the command go generate ./... and then commit the changes this creates.

Additionally, ensure the tests pass by running make testacc. Please let us know the results of this test.

I hope these instructions are clear, and thank you again for your work on this!

@msnidal
msnidal force-pushed the feature/index-metadata-config branch from 939e7d2 to e32a695 Compare August 27, 2023 19:27
@msnidal

msnidal commented Aug 28, 2023

Copy link
Copy Markdown
Contributor Author

Hey @biosugar0 , its been a while but I was able to get back to this and get it up and running, I generated the docs and improved the tests and got them passing (thereby fixing some issues):

TF_ACC=1 go test -count=1 -parallel=4 -timeout 10m -v ./...
?   	terraform-provider-pinecone	[no test files]
=== RUN   TestNewPodType
=== RUN   TestNewPodType/Valid_pod_type
=== RUN   TestNewPodType/Invalid_pod_type
=== RUN   TestNewPodType/Invalid_pod_class
=== RUN   TestNewPodType/Invalid_pod_size
--- PASS: TestNewPodType (0.00s)
    --- PASS: TestNewPodType/Valid_pod_type (0.00s)
    --- PASS: TestNewPodType/Invalid_pod_type (0.00s)
    --- PASS: TestNewPodType/Invalid_pod_class (0.00s)
    --- PASS: TestNewPodType/Invalid_pod_size (0.00s)
=== RUN   TestMetadataConfig
=== RUN   TestMetadataConfig/MetadataConfig_with_one_indexed_field
=== RUN   TestMetadataConfig/MetadataConfig_with_multiple_indexed_fields
=== RUN   TestMetadataConfig/MetadataConfig_with_no_indexed_fields
--- PASS: TestMetadataConfig (0.00s)
    --- PASS: TestMetadataConfig/MetadataConfig_with_one_indexed_field (0.00s)
    --- PASS: TestMetadataConfig/MetadataConfig_with_multiple_indexed_fields (0.00s)
    --- PASS: TestMetadataConfig/MetadataConfig_with_no_indexed_fields (0.00s)
=== RUN   TestNewMetric
--- PASS: TestNewMetric (0.00s)
=== RUN   TestMarshalJSON
--- PASS: TestMarshalJSON (0.00s)
=== RUN   TestUnmarshalJSON
--- PASS: TestUnmarshalJSON (0.00s)
=== RUN   TestAccIndexDataSource
--- PASS: TestAccIndexDataSource (0.82s)
=== RUN   TestAccIndexResource
--- PASS: TestAccIndexResource (16.80s)
=== RUN   TestAccIndexResourceWithoutMetadataConfig
--- PASS: TestAccIndexResourceWithoutMetadataConfig (10.90s)
PASS
ok  	terraform-provider-pinecone/pinecone	28.928s

I tried to cover the different cases (included, not included, etc.) let me know what you think!

@biosugar0 biosugar0 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@msnidal Thanks for the improvements and dedication!

@biosugar0
biosugar0 merged commit 2e73d8c into biosugar0:main Aug 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants