From 78e83ee072b8283a4e546996ff468e50e312f9e2 Mon Sep 17 00:00:00 2001 From: Elom Gomez Date: Mon, 21 Sep 2026 16:25:20 -0500 Subject: [PATCH] Document that move-tables list includes every keyspace by default. Omitting --target-keyspace already listed every keyspace; the flag help and agent guide now say that instead of implying a default-keyspace filter. Co-authored-by: Cursor --- AGENTS.md | 3 ++- internal/cmd/branch/vtctld/move_tables.go | 2 +- internal/cmd/branch/vtctld/move_tables_test.go | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 3256702c..a8d7b684 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -481,10 +481,11 @@ External create required flags: `--host`, `--source-database`, `--username`, `-- Copy tables between keyspaces with `pscale branch vtctld move-tables`. `pscale workflow` will be deprecated soon; prefer `move-tables` for new work. JSON output includes `next_steps` — follow those commands. Typical order: create the target keyspace (`keyspace create` or `keyspace create-external`), create the workflow, poll `status`, switch replica traffic, then primary traffic (ask the user first), then `complete --dry-run` and `complete` after approval. Create with `--auto-start=false` to leave streams stopped, then `start` when you are ready. -`--workflow` is the workflow name you choose. `--source-keyspace` and `--target-keyspace` are required on create. Pass `--tables t1,t2` or `--all-tables` (mutually exclusive). +`--workflow` is the workflow name you choose. `--source-keyspace` and `--target-keyspace` are required on create. Pass `--tables t1,t2` or `--all-tables` (mutually exclusive). `list` without `--target-keyspace` returns workflows in every keyspace on the branch. ```bash pscale branch vtctld move-tables list --org --format json +pscale branch vtctld move-tables list --org --format json --target-keyspace pscale branch vtctld move-tables create --org --format json \ --workflow --source-keyspace --target-keyspace --tables pscale branch vtctld move-tables create --org --format json \ diff --git a/internal/cmd/branch/vtctld/move_tables.go b/internal/cmd/branch/vtctld/move_tables.go index 5b6f29ab..ec56b9dc 100644 --- a/internal/cmd/branch/vtctld/move_tables.go +++ b/internal/cmd/branch/vtctld/move_tables.go @@ -194,7 +194,7 @@ func MoveTablesListCmd(ch *cmdutil.Helper) *cobra.Command { }, } - cmd.Flags().StringVar(&flags.targetKeyspace, "target-keyspace", "", "Target keyspace (defaults to the branch's default keyspace)") + cmd.Flags().StringVar(&flags.targetKeyspace, "target-keyspace", "", "Filter by target keyspace (lists all keyspaces if omitted)") return cmd } diff --git a/internal/cmd/branch/vtctld/move_tables_test.go b/internal/cmd/branch/vtctld/move_tables_test.go index a5610072..78189d57 100644 --- a/internal/cmd/branch/vtctld/move_tables_test.go +++ b/internal/cmd/branch/vtctld/move_tables_test.go @@ -663,6 +663,9 @@ func TestMoveTablesListWithoutTargetKeyspace(t *testing.T) { }, } + listCmd := MoveTablesListCmd(moveTablesTestHelper(org, svc, nil, nil)) + c.Assert(listCmd.Flags().Lookup("target-keyspace").Usage, qt.Contains, "lists all keyspaces if omitted") + var buf bytes.Buffer ch := moveTablesTestHelper(org, svc, nil, &buf)