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

[BUG] Move getOrCreate logic down to system catalog #1352

Merged
merged 2 commits into from
Nov 8, 2023

Conversation

Ishiihara
Copy link
Contributor

Description of changes

Summarize the changes made by this PR.

Test plan

How are these changes tested?

  • test_system.py

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?

Copy link

github-actions bot commented Nov 7, 2023

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readbility, Modularity, Intuitiveness)

Copy link
Member

@beggers beggers left a comment

Choose a reason for hiding this comment

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

Looks good

@@ -415,7 +419,7 @@ func TestCreateUpdateWithDatabase(t *testing.T) {
if err != nil {
t.Fatalf("error creating coordinator: %v", err)
}
c.ResetState(ctx)
// c.ResetState(ctx)
Copy link
Member

Choose a reason for hiding this comment

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

A naive question: why do we no longer want to reset state here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I should revert the change.

@@ -10,6 +10,7 @@ type Collection struct {
Topic string
Dimension *int32
Metadata *CollectionMetadata[CollectionMetadataValueType]
Created bool
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shoving created into this feels odd to me

@Ishiihara Ishiihara changed the title Move getOrCreate logic down to system catalog [BUG] Move getOrCreate logic down to system catalog Nov 8, 2023
Copy link
Collaborator

@HammadB HammadB left a comment

Choose a reason for hiding this comment

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

Seems fine. I think the data model is a bit strange though.

@Ishiihara Ishiihara merged commit 233a7cc into chroma-core:main Nov 8, 2023
94 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants