-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[ENH]: add API to list all databases for tenant #3432
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
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
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.
I think we want the tests to cover the case where we have multiple tenants, since we want to be sure that we are correctly listing only the databases in a particular tenant.
Otherwise, implementation LGTM.
for i in range(10): | ||
admin_client.create_database(f"test_list_databases_is_tenant_scoped_{i}") | ||
|
||
databases = admin_client.list_databases(None, None, "new_tenant") |
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.
We should probably put some databases in the other tenant to list as well.
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.
This should probably be a fixture we reuse in each 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.
I think the tests could be still further extended. I'm thinking about protecting us against the scenario where one day someone lists databases and because of a bug we wrote gets other people's databases as well.
ff322a0
to
37701ee
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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.
Looks basically good to go, maybe some minor test improvements.
f2fc604
to
b9bdfe2
Compare
b9bdfe2
to
8b3a2e8
Compare
7d766c5
to
8b3a2e8
Compare
Description of changes
Adds a method to the admin client to list all databases for a tenant. Has limit/offset parameters similar to how listing collections works.
The implementation for distributed Chroma is in a separate PR, next in this stack: #3440.
See https://github.com/chroma-core/hosted-chroma/issues/900 for main tracking issue.
Test plan
How are these changes tested?
pytest
for python,yarn test
for js,cargo test
for rustDocumentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?
Updated.