{"record":{"id":"6a6b37f179d6fad3","repo":"vitessio/vitess","slug":"invalid-action-s-s-6a6b37","errorCode":null,"errorMessage":"invalid action %s; %s","messagePattern":"invalid action (.+?); (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/vtctl/vdiff2.go","lineNumber":217,"sourceCode":"\t\t} else {\n\t\t\tdisplayVDiff2ScheduledResponse(wr, format, vdiffUUID.String(), action)\n\t\t}\n\tcase vdiff.ShowAction:\n\t\tif output == nil {\n\t\t\t// should not happen\n\t\t\treturn errors.New(\"invalid (empty) response from show command\")\n\t\t}\n\t\tif err := displayVDiff2ShowResponse(wr, format, keyspace, workflowName, actionArg, output, *verbose); err != nil {\n\t\t\treturn err\n\t\t}\n\tcase vdiff.StopAction, vdiff.DeleteAction:\n\t\tuuidToDisplay := \"\"\n\t\tif actionArg != vdiff.AllActionArg {\n\t\t\tuuidToDisplay = vdiffUUID.String()\n\t\t}\n\t\tdisplayVDiff2ActionStatusResponse(wr, format, uuidToDisplay, action, vdiff.CompletedState)\n\tdefault:\n\t\treturn fmt.Errorf(\"invalid action %s; %s\", action, usage)\n\t}\n\n\treturn nil\n}\n\n// region ****show response\n\n// summary aggregates/selects the current state of the vdiff from all shards\n\ntype vdiffTableSummary struct {\n\tTableName       string\n\tState           vdiff.VDiffState\n\tRowsCompared    int64\n\tMatchingRows    int64\n\tMismatchedRows  int64\n\tExtraRowsSource int64\n\tExtraRowsTarget int64\n\tLastUpdated     string `json:\"LastUpdated,omitempty\"`","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vtctl/vdiff2.go#L199-L235","documentation":"A second default-case guard at the end of commandVDiff2 returns the same 'invalid action' message after the switch (a defensive/legacy path). Like 1033 it fires when the action verb is not one of the recognized VDiff actions, appending usage help.","triggerScenarios":"Same as 1033: invoking VDiff with an action name outside the recognized set; also reachable if a case falls through without returning so control reaches the trailing default.","commonSituations":"Misspelled action verbs; scripts built against an older Vitess version whose action names changed; automation sending literal placeholders like `<action>`.","solutions":["Read the usage text included in the error and use a valid action.","Correct typos in the action verb.","Align scripts with the action set of the installed Vitess version.","Use `show all` as the safe discovery action when unsure."],"exampleFix":"// before\nVDiff -- commerce.move.tables cancle bd2f3e5a-...\n// after\nVDiff -- commerce.move.tables stop bd2f3e5a-...","handlingStrategy":"validation","validationCode":"const known = new Set([\"show\", \"stop\", \"resume\", \"delete\"])\nif (!known.has(action)) {\n  throw new Error(`Unknown VDiff action '${action}' — check usage before invoking`)\n}","typeGuard":"function isKnownAction(a) {\n  return typeof a === \"string\" && [\"show\", \"stop\", \"resume\", \"delete\"].includes(a)\n}","tryCatchPattern":"try {\n  runVDiff(`-- ${ks}.${wf} ${action} ${arg}`)\n} catch (e) {\n  if (String(e).includes(\"invalid action\")) {\n    runVDiff(\"--help\")\n  } else throw e\n}","preventionTips":["Lint automation scripts for VDiff action names after Vitess upgrades.","Never pass literal placeholders like <action> from templates.","Prefer explicit show/stop/resume/delete strings over computed action variables."],"tags":["cli","vdiff","invalid-action","vreplication"],"backgroundTag":"invalid-cli-action","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}