{"record":{"id":"a142a216910b50aa","repo":"vitessio/vitess","slug":"can-only-show-a-specific-vdiff-please-provide-a-v","errorCode":null,"errorMessage":"can only show a specific vdiff, please provide a valid UUID; view all with: VDiff -- %s.%s show all","messagePattern":"can only show a specific vdiff, please provide a valid UUID; view all with: VDiff -- (.+?)\\.(.+?) show all","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/vtctl/vdiff2.go","lineNumber":149,"sourceCode":"\n\tvar vdiffUUID uuid.UUID\n\tswitch action {\n\tcase vdiff.CreateAction:\n\t\tif actionArg != \"\" {\n\t\t\tvdiffUUID, err = uuid.Parse(actionArg)\n\t\t} else {\n\t\t\tvdiffUUID, err = uuid.NewUUID()\n\t\t}\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"%v, please provide a valid UUID\", err)\n\t\t}\n\tcase vdiff.ShowAction:\n\t\tswitch actionArg {\n\t\tcase vdiff.AllActionArg, vdiff.LastActionArg:\n\t\tdefault:\n\t\t\tvdiffUUID, err = uuid.Parse(actionArg)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"can only show a specific vdiff, please provide a valid UUID; view all with: VDiff -- %s.%s show all\", keyspace, workflowName)\n\t\t\t}\n\t\t}\n\tcase vdiff.StopAction, vdiff.ResumeAction:\n\t\tvdiffUUID, err = uuid.Parse(actionArg)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"can only %s a specific vdiff, please provide a valid UUID; view all with: VDiff -- %s.%s show all\", action, keyspace, workflowName)\n\t\t}\n\tcase vdiff.DeleteAction:\n\t\tswitch actionArg {\n\t\tcase vdiff.AllActionArg:\n\t\tdefault:\n\t\t\tvdiffUUID, err = uuid.Parse(actionArg)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"can only delete a specific vdiff, please provide a valid UUID; view all with: VDiff -- %s.%s show all\", keyspace, workflowName)\n\t\t\t}\n\t\t}\n\tdefault:\n\t\treturn fmt.Errorf(\"invalid action '%s'; %s\", action, usage)","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vtctl/vdiff2.go#L131-L167","documentation":"commandVDiff2 validates the argument to `VDiff -- ks.workflow show`. For the show action, only the special args `all` or `last` are allowed non-UUID, anything else must parse as a valid UUID. If uuid.Parse fails, this error is returned telling the user how to list all vdiffs instead.","triggerScenarios":"Running `VDiff -- <keyspace>.<workflow> show <arg>` where <arg> is neither `all`/`last` nor a parseable UUID string (e.g. a truncated UUID, a name/label, a typo, or an empty extra argument).","commonSituations":"Developers passing a human-friendly label or partial UUID to `show`; shell quoting splitting the argument so an empty/garbage token reaches the parser; copying a UUID with surrounding whitespace or braces.","solutions":["Run `VDiff -- <keyspace>.<workflow> show all` to list valid vdiff UUIDs, then use the full UUID.","Use `show last` if you want the most recent vdiff instead of a specific one.","Verify the UUID is complete, unquoted-exact, and has no trailing whitespace.","Check the VDiff action/argument order matches the expected CLI form: VDiff -- <keyspace.workflow> show <uuid|all|last>."],"exampleFix":"// before\nVDiff -- commerce.move.tables show bd2f3e\n// after\nVDiff -- commerce.move.tables show all\nVDiff -- commerce.move.tables show bd2f3e5a-1234-5678-9abc-def012345678","handlingStrategy":"validation","validationCode":"const uuidRe = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i\nconst arg = \"bd2f3e5a-1234-5678-9abc-def012345678\"\nif (!/^(all|last)$/.test(arg) && !uuidRe.test(arg.trim())) {\n  throw new Error(`use 'show all' or a valid UUID, got: ${arg}`)\n}","typeGuard":"function isVDiffShowArg(s) {\n  return s === \"all\" || s === \"last\" || /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(s)\n}","tryCatchPattern":"try {\n  runVDiff(`-- commerce.move.tables show ${arg}`)\n} catch (e) {\n  if (String(e).includes(\"provide a valid UUID\")) {\n    console.error(\"Listing vdiffs instead:\")\n    runVDiff(\"-- commerce.move.tables show all\")\n  } else throw e\n}","preventionTips":["Always run `show all` first and copy a UUID verbatim from the output.","Use `show last` instead of hunting for a UUID when you want the latest vdiff.","Quote arguments in shell scripts to avoid token splitting."],"tags":["cli","vdiff","uuid-validation","vreplication"],"backgroundTag":"invalid-uuid-argument","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}