Publish WCD test-cluster restore tooling - #446
Merged
Merged
Conversation
Consolidate the three local-only restore scripts (restore.py, repopulate.py, repopulate_jeopardy.py) into a single coherent restore.py CLI with --stage flags (all | 1 | 2,3), a shared connection/config/insert path, per-stage env validation, and snapshot-dir resolution via $WEAVIATE_BACKUP_DIR or the newest backup_*/ directory (no more hardcoded timestamp). All prior behavior is preserved: stage-1 idempotency, the legacy-vectorizer wire-format unwrap, object[] nested-property inference, named-vector detection, and skipping the agents-owned collections (ECommerce, Weather, FinancialContracts). Rewrite README.md for the single CLI and document that the snapshot is not committed and how restore.py locates it. Narrow .gitignore from tests/backups/ to tests/backups/backup_*/ so the restore tooling is tracked while the multi-hundred-MB snapshot data stays out of git. Co-Authored-By: Claude Opus 4.8 (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 |
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.
What
Turns the local-only WCD test-cluster restore scripts into coherent, committable tooling under
tests/backups/.restore.py+repopulate.py+repopulate_jeopardy.pyinto a singlerestore.pyCLI:--stage all | 1 | 2,3(defaultall)OPENAI_API_KEYrequired only for stages 2/3)$WEAVIATE_BACKUP_DIRor the newestbackup_*/directory — no hardcoded timestamp to bumpREADME.mdfor the single CLI and the gitignored-snapshot model (how the snapshot is located; that it is not committed; how to obtain it)..gitignorefromtests/backups/totests/backups/backup_*/so the tooling is tracked while the multi-hundred-MB snapshot data stays out of git.All prior behavior is preserved: stage-1 idempotency, the legacy-vectorizer wire-format unwrap (
coerce),object[]nested-property inference, named-vector detection, ada-002 pinning, and skipping the agents-owned collections (ECommerce,Weather,FinancialContracts).Why
These materials were gitignored, ad-hoc, and split across three scripts with duplicated logic and a hardcoded snapshot path. This makes them a single, documented entrypoint that's safe to track in the repo.
The agents-owned skip also fixes a real failure: restoring the snapshot's lossy
ECommerceshadowed the Query Agent tests' owntext2vec-weaviatesetup and producedWEAVIATE_NAMED_VECTOR_ERROR/collection_vectors: [].Verification
py_compilepasses;--stageparsing correct (all/1/2,3;4rejected);--helprenders.git add -n tests/backups/stages onlyrestore.py+README.md— never the snapshot or__pycache__.--stage 1): auto-detected the snapshot, connected, idempotently skipped all populated collections, and skipped the three agents-owned collections.The snapshot data itself is intentionally not included (it is hundreds of MB and stays gitignored).
🤖 Generated with Claude Code