Add --async_replication_config option to create/update collection#164
Add --async_replication_config option to create/update collection#164
Conversation
Expose the 14 async replication tuning parameters from weaviate-python-client PR #1953 via a single repeatable --async_replication_config key=value option. This avoids bloating the CLI with 14 individual flags while letting users configure any subset of parameters. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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 |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a new repeatable --async_replication_config key=value option to the CLI to expose async replication tuning parameters when creating/updating collections, including parsing/validation logic and unit tests to cover the new behavior.
Changes:
- Introduces
parse_async_replication_config()and a validated key allowlist for async replication tuning parameters. - Wires
async_configinto collection create/update replication config via the Python client configuration objects. - Adds unit tests for the parser and manager create/update paths; updates operating docs for the new option.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
weaviate_cli/utils.py |
Adds allowlisted keys and a parser to convert repeatable key=value tuples into a validated dict of ints. |
weaviate_cli/managers/collection_manager.py |
Passes parsed async replication config into wvc.Configure/Reconfigure.*.async_config(...) when present. |
weaviate_cli/defaults.py |
Adds defaults entries for the new CLI option. |
weaviate_cli/commands/create.py |
Adds Click option and passes parsed async replication config into CollectionManager.create_collection(...). |
weaviate_cli/commands/update.py |
Adds Click option and passes parsed async replication config into CollectionManager.update_collection(...). |
test/unittests/test_utils.py |
Adds unit tests for the async replication config parser (happy path + error cases). |
test/unittests/test_managers/test_collection_manager.py |
Adds tests asserting asyncConfig is set/omitted on create/update replication config. |
.claude/skills/operating-weaviate-cli/references/collections.md |
Documents the new option and provides examples for create/update. |
.claude/skills/operating-weaviate-cli/SKILL.md |
Updates the “operating” skill docs with the new option and examples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Reject --async_replication_config when --async_enabled is not set (create) - Reject --async_replication_config when --async_enabled is False (update) - Warn when server version is older than v1.36.0 - Generate Click help text from ASYNC_REPLICATION_CONFIG_KEYS constant - Add validation tests for both create and update paths Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.claude/skills/operating-weaviate-cli/references/collections.md
Outdated
Show resolved
Hide resolved
- Add --async_enabled prerequisite to help text, SKILL.md, and collections.md - Point weaviate-client dependency to jose/fix-async-repl-config-get branch - Update setup.cfg install_requires to match Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 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 --async_enabled prerequisite to help text, SKILL.md, and collections.md - Point weaviate-client dependency to jose/fix-async-repl-config-get branch - Update setup.cfg install_requires to match - Change minimum version to 1.34.18 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Support "reset" keyword to revert all async replication settings to server defaults. Use `is not None` checks so empty dict (reset) is correctly forwarded as an empty async_config() call. Update version references to v1.34.18. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
68f553a to
9ebab2b
Compare
Summary
--async_replication_config key=valuerepeatable option tocreate collectionandupdate collectioncommandsparse_async_replication_config()helper in utils.py with key/value validationCloses #163
Usage
Test plan
make lintpassesmake testpasses (283/283)🤖 Generated with Claude Code