{"record":{"id":"0d24bac1181034f5","repo":"GoogleContainerTools/skaffold","slug":"custom-action-v-not-found","errorCode":null,"errorMessage":"custom action %v not found","messagePattern":"custom action (.+?) not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/actions/runner.go","lineNumber":62,"sourceCode":"\nfunc NewRunner(execEnvByAction map[string]ExecEnv, orderedExecEnvs []ExecEnv, acsByExecEnv map[ExecEnv][]string) Runner {\n\treturn Runner{execEnvByAction, orderedExecEnvs, acsByExecEnv}\n}\n\nfunc (r Runner) ExecAll(ctx context.Context, out io.Writer, allbuilds, localImgs []graph.Artifact) error {\n\tacs, err := r.prepareAllActions(ctx, out, allbuilds, localImgs)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdefer r.cleanup(ctx, out, acs, r.orderedExecEnvs)\n\treturn execWithFailingSafe(ctx, out, acs)\n}\n\nfunc (r Runner) Exec(ctx context.Context, out io.Writer, allbuilds, localImgs []graph.Artifact, aName string) error {\n\texecEnv, found := r.execEnvByAction[aName]\n\tif !found {\n\t\treturn fmt.Errorf(\"custom action %v not found\", aName)\n\t}\n\n\toutput.Default.Fprintln(out, fmt.Sprintf(\"Starting execution for %v\", aName))\n\tlog.Entry(ctx).Debugf(\"Starting execution for %v\", aName)\n\n\tacs, err := execEnv.PrepareActions(ctx, out, allbuilds, localImgs, []string{aName})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// We expect only one action to be created.\n\tif len(acs) != 1 {\n\t\treturn fmt.Errorf(\"failed to create %v action\", aName)\n\t}\n\n\ta := acs[0]\n\n\terr = a.Exec(ctx, out)","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/actions/runner.go#L44-L80","documentation":"Runner.Exec looks up the execution environment for a custom action by name in execEnvByAction. If the requested action name is not defined in skaffold.yaml, it returns this error. It guards against invoking an action that was never registered.","triggerScenarios":"Calling skaffold custom-action (or Exec) with an action name that is not declared under customActions in skaffold.yaml, or the action is defined in a different profile that isn't activated.","commonSituations":"Typo in action name on the command line; action defined only behind a --profile flag that wasn't passed; renamed action in config but CI script still uses the old name.","solutions":["Check `skaffold config` / skaffold.yaml customActions entries for the exact action name","Pass the profile that defines the action: --profile <name>","Fix the typo in the action name in the command or calling script"],"exampleFix":"// before (skaffold.yaml has action 'db-migrate')\nskaffold custom-action run myaction\n// after\nskaffold custom-action run db-migrate","handlingStrategy":"validation","validationCode":"const { execSync } = require('child_process');\nconst cfg = execSync('cat skaffold.yaml').toString();\nif (!cfg.includes(`name: ${actionName}`)) {\n  throw new Error(`action ${actionName} not in skaffold.yaml; check profile flags`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep action names in one shared constants list used by CI scripts","Always pass the same --profile flags used when defining actions","Grep skaffold.yaml for the action name before invoking it"],"tags":["configuration","custom-action","skaffold-yaml"],"backgroundTag":"action-not-found","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}