feat(migrator): [6/7] CLI commands and documentation with rvl migrate subcommand, user guide, and concept docs#565
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
|
@codex review |
There was a problem hiding this comment.
Pull request overview
Adds a new rvl migrate CLI command group to expose the index migration planner/executor/validator workflow, alongside substantial documentation covering migration concepts, field attribute updates, and user-facing how-to guidance.
Changes:
- Introduces
redisvl/cli/migrate.pyand wires it into the top-level CLI (rvl migrate ...). - Refactors CLI option helpers to share Redis connection flags, and expands docs to include migration concepts + a migration how-to guide.
- Adds/updates contributor guidance (
AGENTS.md,CONTRIBUTING.md) and updates ignore patterns for migration artifacts.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| redisvl/cli/utils.py | Refactors CLI arg helpers; centralizes Redis connection options. |
| redisvl/cli/migrate.py | New migration CLI command group (plan/apply/validate + batch operations). |
| redisvl/cli/main.py | Wires migrate into top-level CLI routing/usage text. |
| docs/user_guide/index.md | Adds migrations to user guide landing page cards. |
| docs/user_guide/how_to_guides/migrate-indexes.md | New end-to-end migration how-to guide for the CLI workflow. |
| docs/user_guide/how_to_guides/index.md | Adds migration guide to how-to index and toctree. |
| docs/user_guide/cli.ipynb | Updates CLI notebook to include rvl migrate commands. |
| docs/user_guide/13_sql_query_exercises.ipynb | Adds a new SQLQuery exercises notebook. |
| docs/concepts/search-and-indexing.md | Mentions the migration workflow in indexing lifecycle docs. |
| docs/concepts/index.md | Adds “Index Migrations” to concepts navigation. |
| docs/concepts/index-migrations.md | New concept doc explaining migration modes/limits and sync vs async. |
| docs/concepts/field-attributes.md | Expands vector datatype docs + adds migration/wizard attribute support notes. |
| docs/api/cli.rst | Adds (new) CLI reference page. |
| CONTRIBUTING.md | Adds conventional branch/commit guidance. |
| AGENTS.md | Adds project context, workflows, and repo conventions. |
| .gitignore | Ignores migration output artifacts and adds additional local dev ignores. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 16 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 751a0e5950
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 16 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b94e57a to
541db34
Compare
- Fix create_redis_url: use 'rediss://' scheme instead of 'redis://rediss://' - Exit with status 1 on unknown subcommand - Fix SVS_VAMANA -> SVS-VAMANA in help text - Add field_rename and key_rename progress steps (8 total) - Exit with status 1 when batch state file not found
Per AGENTS.md convention, local imports should have a comment explaining why they are not at module level.
- Remove leftover numbered list fragment in migrate-indexes.md (#565 #20) - Extract duplicated progress_callback into shared _make_progress_callback method in migrate.py (#565 #21) - Add rvl migrate section to CLI reference docs (#565 #19) - Add try/except for matplotlib import in visualize_results.py (#566 #14)
751a0e5 to
49ce997
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 49ce997cbd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ate subcommand, user guide, and concept docs CLI interface for migration operations (plan, execute, wizard) via rvl migrate subcommand. Includes comprehensive user guide, concept documentation for index migrations and field attributes, and updated CLI reference. Also adds AGENTS.md project context and updates CONTRIBUTING.md with conventional commit and branch guidelines.
- Fix create_redis_url: use 'rediss://' scheme instead of 'redis://rediss://' - Exit with status 1 on unknown subcommand - Fix SVS_VAMANA -> SVS-VAMANA in help text - Add field_rename and key_rename progress steps (8 total) - Exit with status 1 when batch state file not found
Per AGENTS.md convention, local imports should have a comment explaining why they are not at module level.
- Align batch-status display to use 'success' matching BatchIndexState model - Clean up batch executor status check to use canonical 'success' only
541db34 to
7eea293
Compare
- Remove leftover numbered list fragment in migrate-indexes.md (#565 #20) - Extract duplicated progress_callback into shared _make_progress_callback method in migrate.py (#565 #21) - Add rvl migrate section to CLI reference docs (#565 #19) - Add try/except for matplotlib import in visualize_results.py (#566 #14)
49ce997 to
a1d54c9
Compare
|
@codex review |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 17 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (2)
redisvl/cli/utils.py:26
create_redis_url()will always include a username in the constructed URL because--userdefaults to "default" and the code appendsargs.userwhenever it is truthy. This produces URLs likeredis://default@localhost:6379even when the user didn’t pass--user, which can be incompatible with some Redis client/auth configurations. Consider defaulting--userto an empty string/None and only injectingusername@(and:password) when the user explicitly provided credentials (or at least when a password is provided).
if args.ssl:
url = "rediss://"
else:
url = "redis://"
if args.user:
url += args.user
if args.password:
url += ":" + args.password
url += "@"
url += args.host + ":" + str(args.port)
redisvl/migration/batch_executor.py:336
BatchIndexState.statusappears to be standardized onsuccess/failed/skipped, but there’s existing usage ofstatus: "succeeded"in persisted checkpoint examples/tests (e.g.tests/integration/test_batch_migration_integration.pysimulates a checkpoint with"succeeded"). With this change, any legacy checkpoint/state file containingsucceededwill be counted asskippedhere (and also won’t contribute toBatchState.success_count). Consider keeping backward compatibility by treatingsucceededas an alias ofsuccesswhen loading state / computing summaries.
if idx_state.status == "success":
succeeded += 1
elif idx_state.status == "failed":
failed += 1
else:
skipped += 1
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| **Syntax** | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| rvl migrate plan --index <name> (--patch <patch.yaml> | --target-schema <schema.yaml>) [OPTIONS] | ||
|
|
||
| **Required Options** | ||
|
|
||
| .. list-table:: | ||
| :widths: 30 70 | ||
| :header-rows: 1 | ||
|
|
||
| * - Option | ||
| - Description | ||
| * - ``--index``, ``-i`` | ||
| - Name of the source index to migrate | ||
| * - ``--patch`` | ||
| - Path to a YAML schema patch file (mutually exclusive with ``--target-schema``) | ||
| * - ``--target-schema`` | ||
| - Path to a full target schema YAML file (mutually exclusive with ``--patch``) | ||
|
|
||
| **Optional Options** | ||
|
|
||
| .. list-table:: | ||
| :widths: 30 70 | ||
| :header-rows: 1 | ||
|
|
||
| * - Option | ||
| - Description | ||
| * - ``--output``, ``-o`` | ||
| - Output path for the migration plan YAML (default: ``migration_plan.yaml``) | ||
|
|
||
| **Example** | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| rvl migrate plan -i my_index --patch changes.yaml -o plan.yaml | ||
|
|
There was a problem hiding this comment.
The migrate CLI reference here documents --patch/-o/--output, but the implementation in redisvl/cli/migrate.py uses --schema-patch/--target-schema and --plan-out instead. This mismatch will lead users to run commands that error. Update the documented flags and example invocation to match the actual CLI arguments.
| **Optional Options** | ||
|
|
||
| .. list-table:: | ||
| :widths: 30 70 | ||
| :header-rows: 1 | ||
|
|
||
| * - Option | ||
| - Description | ||
| * - ``--async`` | ||
| - Run migration asynchronously (recommended for large quantization jobs) | ||
| * - ``--query-check`` | ||
| - Path to a YAML file with post-migration query checks | ||
| * - ``--resume`` | ||
| - Path to a checkpoint file for crash-safe recovery | ||
|
|
There was a problem hiding this comment.
The rvl migrate apply options listed here include --query-check, but the CLI implementation uses --query-check-file (and also supports --report-out / --benchmark-out). Align this table and examples with the actual flags so users can successfully run apply/validate workflows.
| { | ||
| "cells": [ | ||
| { | ||
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "# SQL-to-Redis Query Translation: Hands-On Exercises\n", | ||
| "\n", | ||
| "This notebook provides hands-on exercises for learning the new **SQLQuery** feature in RedisVL, which allows you to write familiar SQL syntax that automatically translates to Redis Search commands.\n", | ||
| "\n", | ||
| "## What You'll Learn\n", | ||
| "\n", | ||
| "1. How to use the `SQLQuery` class to write SQL-like queries\n", | ||
| "2. Three equivalent approaches for the same queries:\n", | ||
| " - **RedisVL Python API** - Using native query classes (`FilterQuery`, `VectorQuery`, etc.)\n", | ||
| " - **RedisVL SQL** - Using the new `SQLQuery` class with SQL syntax\n", | ||
| " - **Raw Redis FT.SEARCH** - The equivalent Redis Search command\n", | ||
| "3. Various query types: filtering, numeric ranges, text search, aggregations, and vector similarity\n", | ||
| "\n", | ||
| "## Prerequisites\n", | ||
| "\n", | ||
| "- Redis Stack running locally (or Redis Cloud)\n", | ||
| "- RedisVL with SQL support: `pip install redisvl[sql-redis]`\n", | ||
| "\n", | ||
| "## Documentation References\n", | ||
| "\n", | ||
| "- [RedisVL Documentation](https://docs.redisvl.com)\n", | ||
| "- [Redis Search Query Syntax](https://redis.io/docs/latest/develop/ai/search-and-query/query/)\n", | ||
| "- [Redis Aggregations](https://redis.io/docs/latest/develop/ai/search-and-query/advanced-concepts/aggregations/)\n", | ||
| "- [sql-redis Package](https://pypi.org/project/sql-redis/)\n", | ||
| "\n", | ||
| "---" | ||
| ] |
There was a problem hiding this comment.
This PR is scoped to migrator CLI/docs, but this notebook adds a large set of SQLQuery exercises that appear unrelated to index migrations. If this is intentional, it may deserve its own PR to keep the migrator series focused; if not, consider dropping it from this change to reduce review surface and documentation churn.
| "# YOUR CODE HERE - Method 1: RedisVL Python API\n", | ||
| "# Hint: Use Tag(\"category\") == \"electronics\" with FilterQuery\n", | ||
| "q= FilterQuery(\n", | ||
| " filter_expression=Tag(\"category\") == \"electronics\",\n", | ||
| " return_fields=[\"name\", \"category\", \"price\"],\n", | ||
| " num_results=10\n", | ||
| ")\n", |
There was a problem hiding this comment.
Minor formatting issue in this exercise cell: q= FilterQuery( is missing a space around = (q = FilterQuery(...)). Since this is user-facing tutorial content, fixing it improves readability and copy/paste quality.
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |

Summary
CLI interface for migration operations (plan, execute, wizard) via rvl migrate subcommand. Includes comprehensive user guide, concept documentation for index migrations and field attributes, and updated CLI reference.
Also adds AGENTS.md project context and updates CONTRIBUTING.md with conventional commit and branch guidelines.
Files
redisvl/cli/migrate.py,main.py,utils.pydocs/- concept docs, how-to guide, CLI reference updates.gitignore,AGENTS.md,CONTRIBUTING.mdStack
Note
Medium Risk
Introduces a new CLI surface that can drop/recreate indexes and optionally rewrite stored vectors, so incorrect usage or edge cases could cause downtime or data mutations. Core changes are mostly additive, but they touch user-facing CLI parsing and batch status accounting.
Overview
Adds a new
rvl migratecommand group to the CLI, wiring it intoredisvl/cli/main.pyand implementing subcommands for migration planning, interactive wizarding, apply (sync/async), disk-space estimation, validation, and batch plan/apply/resume/status inredisvl/cli/migrate.py.Updates CLI connection handling by centralizing Redis connection flags via
add_redis_connection_options()and fixing URL scheme selection (redis://vsrediss://) increate_redis_url(), plus a small correctness tweak in batch report success counting (BatchMigrationExecutor).Expands documentation substantially: adds a full CLI reference page (
docs/api/cli.rst), new concepts page for migrations (docs/concepts/index-migrations.md), enriches field-attribute docs with vector datatype/quantization and migration support, and adds a detailed how-to guide (docs/user_guide/how_to_guides/migrate-indexes.md) alongside navigation updates and minor CLI notebook updates. Also addsAGENTS.md, updates contributing guidelines for conventional branches/commits, and extends.gitignorefor local/migration artifacts.Written by Cursor Bugbot for commit a1d54c9. This will update automatically on new commits. Configure here.