Skip to content

Add --async_replication_config option to create/update collection#164

Open
jfrancoa wants to merge 6 commits intomainfrom
jose/async-replication-collection-params
Open

Add --async_replication_config option to create/update collection#164
jfrancoa wants to merge 6 commits intomainfrom
jose/async-replication-collection-params

Conversation

@jfrancoa
Copy link
Copy Markdown
Collaborator

Summary

  • Add --async_replication_config key=value repeatable option to create collection and update collection commands
  • Exposes 14 async replication tuning parameters (max_workers, frequency, propagation_concurrency, etc.) from weaviate-python-client PR #1953
  • Uses a single repeatable option with key=value pairs instead of 14 individual flags to keep the CLI clean
  • Add parse_async_replication_config() helper in utils.py with key/value validation
  • Add unit tests for the parser and both create/update collection paths

Closes #163

Usage

# Create with async replication config
weaviate-cli create collection --collection MyCol --async_enabled \
  --async_replication_config max_workers=10 \
  --async_replication_config frequency=60 \
  --async_replication_config propagation_concurrency=4

# Update async replication config
weaviate-cli update collection --collection MyCol \
  --async_replication_config max_workers=20 \
  --async_replication_config propagation_batch_size=100

Test plan

  • make lint passes
  • make test passes (283/283)
  • Manual test with Weaviate >= v1.36.0

🤖 Generated with Claude Code

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>
Copy link
Copy Markdown

@orca-security-eu orca-security-eu bot left a comment

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_config into 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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

- 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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

jfrancoa and others added 2 commits March 27, 2026 07:51
- 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>
@jfrancoa jfrancoa force-pushed the jose/async-replication-collection-params branch from 68f553a to 9ebab2b Compare March 27, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add --async_replication_config option to create/update collection

2 participants