Conversation
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors tenant handling in the CLI to support explicitly named tenants during creation and to better control which tenants are targeted during data ingestion, including behavior when auto-tenant creation is enabled at the schema level.
Changes:
- Add support for creating tenants from an explicit
--tenantslist (instead of only auto-generating names). - Refactor tenant creation logic into helper methods for name resolution and post-create verification.
- Add a tenant-resolution helper for data ingestion to handle MT/non-MT collections and tenant selection options more cleanly.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
weaviate_cli/managers/tenant_manager.py |
Adds explicit tenant list support and refactors generation/verification into helpers. |
weaviate_cli/managers/data_manager.py |
Adds _resolve_tenants_for_ingestion() and refactors create_data() tenant selection flow. |
weaviate_cli/defaults.py |
Extends tenant-creation defaults to include an optional tenants list. |
weaviate_cli/commands/create.py |
Adds --tenants option to the create tenants CLI command and wires it into TenantManager. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c8bbd76 to
8594e1d
Compare
8 tasks
ad74197 to
bba26f0
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add --tenants <list> to create tenants for explicit name-based creation - Add --tenants <list> and --auto_tenants N to create data for targeted ingestion - Extract _resolve_tenants_for_ingestion() in DataManager to centralise MT/non-MT, auto-creation, explicit-list, and suffix-fallback resolution logic - Fix missing json_output support in TenantManager.create_tenants() - Strip whitespace and filter empty entries from all comma-separated --tenants inputs across create, update, and delete commands - Add unit tests covering all _resolve_tenants_for_ingestion() branches and error paths - Update operating and contributing skill documentation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
bba26f0 to
b8aa2b7
Compare
This was referenced Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--tenants <list>tocreate tenantsfor creating tenants by explicit nameinstead of auto-generated suffix+counter patterns
--tenants <list>and--auto_tenants Ntocreate datafor targeted ingestioninto specific or auto-generated tenants (requires
auto_tenant_creationon the collection)_resolve_tenants_for_ingestion()inDataManagerto centralise theMT vs non-MT, auto-creation, explicit-list, and suffix-fallback resolution logic
json_outputsupport inTenantManager.create_tenants()--tenantsinputsacross
create,update, anddeletecommandsCloses #157
Fixes #155
Test plan
make lintpassesmake testpasses (229/229 unit tests)_resolve_tenants_for_ingestion()decision branches and error pathscreate tenants --tenants "A,B,C"creates exactly those tenantscreate tenants --jsonproduces structured JSON output--tenants "A, B, "handled gracefully (stripped + empty entries dropped)🤖 Generated with Claude Code