{"record":{"id":"9192705fb6a2170a","repo":"vitessio/vitess","slug":"can-only-delete-a-specific-vdiff-please-provide-a","errorCode":null,"errorMessage":"can only delete a specific vdiff, please provide a valid UUID; view all with: VDiff -- %s.%s show all","messagePattern":"can only delete 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":163,"sourceCode":"\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)\n\t}\n\n\toutput, err := wr.VDiff2(ctx, keyspace, workflowName, action, actionArg, vdiffUUID.String(), options)\n\tif err != nil {\n\t\tlog.Error(fmt.Sprintf(\"vdiff2 returning with error: %v\", err))\n\t\treturn err\n\t}\n\n\tswitch action {\n\tcase vdiff.CreateAction, vdiff.ResumeAction:\n\t\tif *wait {\n\t\t\ttkr := time.NewTicker(*waitUpdateInterval)\n\t\t\tdefer tkr.Stop()\n\t\t\tvar err error","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vtctl/vdiff2.go#L145-L181","documentation":"For the `delete` VDiff action, the only non-UUID argument accepted is `all`; any other argument must be a valid UUID of one specific vdiff. When uuid.Parse fails, this error is returned with the `show all` hint.","triggerScenarios":"Running `VDiff -- <keyspace>.<workflow> delete <arg>` where <arg> is not `all` and not a parseable UUID (e.g. `last`, a table name, or a malformed UUID).","commonSituations":"Typing `delete last` assuming parity with `show last`; deleting by short UUID prefix; passing an empty argument after `delete`.","solutions":["List UUIDs via `VDiff -- <keyspace>.<workflow> show all` and use one exact UUID.","Use `delete all` if you intend to remove every vdiff for the workflow.","Verify the UUID characters (no truncation, no stray braces/whitespace)."],"exampleFix":"// before\nVDiff -- commerce.move.tables delete last\n// after\nVDiff -- commerce.move.tables delete all\n// or a specific one\nVDiff -- commerce.move.tables delete bd2f3e5a-1234-5678-9abc-def012345678","handlingStrategy":"validation","validationCode":"if (arg !== \"all\" && !/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(arg.trim())) {\n  throw new Error(`delete requires 'all' or a valid UUID, got: ${arg}`)\n}","typeGuard":"function isValidDeleteArg(s) {\n  return s === \"all\" || /^[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(`-- ${ks}.${wf} delete ${arg}`)\n} catch (e) {\n  if (String(e).includes(\"provide a valid UUID\")) {\n    console.error(\"List valid UUIDs with: VDiff -- \" + ks + \".\" + wf + \" show all\")\n  } else throw e\n}","preventionTips":["Use `delete all` for bulk cleanup rather than guessing at identifiers.","Delete only UUIDs obtained from `show all` in the same session.","Beware that `last` is not accepted by delete — only by show."],"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"}