Skip to content

Publish WCD test-cluster restore tooling - #446

Merged
g-despot merged 1 commit into
mainfrom
fix/publish-backup-restore-tooling
Jun 16, 2026
Merged

Publish WCD test-cluster restore tooling#446
g-despot merged 1 commit into
mainfrom
fix/publish-backup-restore-tooling

Conversation

@g-despot

Copy link
Copy Markdown
Contributor

What

Turns the local-only WCD test-cluster restore scripts into coherent, committable tooling under tests/backups/.

  • Consolidated restore.py + repopulate.py + repopulate_jeopardy.py into a single restore.py CLI:
    • --stage all | 1 | 2,3 (default all)
    • shared connection / config / batch-insert path (no more duplicated client setup)
    • per-stage env validation (OPENAI_API_KEY required only for stages 2/3)
    • snapshot-dir resolution via $WEAVIATE_BACKUP_DIR or the newest backup_*/ directory — no hardcoded timestamp to bump
  • Rewrote README.md for the single CLI and the gitignored-snapshot model (how the snapshot is located; that it is not committed; how to obtain it).
  • Narrowed .gitignore from tests/backups/ to tests/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 ECommerce shadowed the Query Agent tests' own text2vec-weaviate setup and produced WEAVIATE_NAMED_VECTOR_ERROR / collection_vectors: [].

Verification

  • py_compile passes; --stage parsing correct (all / 1 / 2,3; 4 rejected); --help renders.
  • git add -n tests/backups/ stages only restore.py + README.md — never the snapshot or __pycache__.
  • Live non-destructive smoke test (--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

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>

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

Copy link
Copy Markdown

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

@g-despot
g-despot merged commit 6ea8799 into main Jun 16, 2026
12 of 13 checks passed
@g-despot
g-despot deleted the fix/publish-backup-restore-tooling branch June 16, 2026 08:55
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.

1 participant