{"record":{"id":"9678eb61d3f01aa1","repo":"GoogleContainerTools/skaffold","slug":"failed-to-run-transfomer-s-err-v","errorCode":null,"errorMessage":"failed to run transfomer: %s, err: %v","messagePattern":"failed to run transfomer: (.+?), err: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/render/transform/transform.go","lineNumber":140,"sourceCode":"\nfunc (v *Transformer) Transform(ctx context.Context, ml manifest.ManifestList) (manifest.ManifestList, error) {\n\tif v.kptFn == nil {\n\t\treturn ml, nil\n\t}\n\tvar err error\n\tfor _, transformer := range v.kptFn {\n\t\tslice := util.EnvMapToSlice(transformer.ConfigMap, \"=\")\n\t\targs := []string{\"fn\", \"eval\", \"-i\", transformer.Image, \"-o\", \"unwrap\", \"-\", \"--\"}\n\t\targs = append(args, slice...)\n\t\tcmd := exec.CommandContext(ctx, \"kpt\", args...)\n\t\treader := ml.Reader()\n\t\tbuffer := &bytes.Buffer{}\n\t\tcmd.Stdin = reader\n\t\tcmd.Stdout = buffer\n\n\t\terr := util.RunCmd(ctx, cmd)\n\t\tif err != nil {\n\t\t\treturn ml, fmt.Errorf(\"failed to run transfomer: %s, err: %v\", transformer.Image, err)\n\t\t}\n\t\tml, err = manifest.Load(buffer)\n\t\tif err != nil {\n\t\t\treturn ml, err\n\t\t}\n\t}\n\treturn ml, err\n}\n\n// TransformPath transform manifests in-place in filepath.\nfunc (v *Transformer) TransformPath(path string) error {\n\tfor _, transformer := range v.kptFn {\n\t\tkvs := util.EnvMapToSlice(transformer.ConfigMap, \"=\")\n\t\targs := []string{\"fn\", \"eval\", \"-i\", transformer.Image, path, \"--\"}\n\t\targs = append(args, kvs...)\n\t\tcommand := exec.Command(\"kpt\", args...)\n\t\terr := command.Run()\n\t\tif err != nil {","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/render/transform/transform.go#L122-L158","documentation":"Transform pipes rendered manifests through an external transformer container image (stdin/stdout). If the transformer command exits non-zero, this error wraps the image name and underlying error. The (typo 'transfomer') message identifies which transformer image failed.","triggerScenarios":"Transform (called from Render) runs a transformer image via cmd; the image is missing, not pullable, or the transformer binary inside exits with an error on the given input manifests.","commonSituations":"Typos in transformer image name/tag; transformer container not executable or expects different CLI args; transformer fails on the manifest content (e.g. expects a specific schema); no network to pull the image.","solutions":["Read the underlying err in the message — it shows the command's exit failure reason","Run the transformer image manually: `cat manifests.yaml | docker run -i --rm <image> <args>` to reproduce","Fix the transformer image name/tag and args in skaffold.yaml","Ensure the transformer reads stdin and writes valid manifest YAML to stdout","Pre-pull the image / fix registry auth if the failure is image-pull related"],"exampleFix":"// before\ntransformer: ghcr.io/example/kustomize-set-image:v1.2.3  # tag does not exist\n// after\ntransformer: ghcr.io/example/kustomize-set-image:v1.2.2","handlingStrategy":"try-catch","validationCode":"out, err := exec.Command(\"docker\", \"run\", \"--rm\", \"-i\", transformer.Image, transformer.Args...).Run()\n// pre-test: echo 'kind: List' | docker run -i --rm <image> <args>","typeGuard":null,"tryCatchPattern":"ml, err := Transform(ctx, out, transformer, ml)\nif err != nil && strings.Contains(err.Error(), \"failed to run transfomer\") {\n    return fmt.Errorf(\"transformer %s failed; verify image and args manually: %w\", transformer.Image, err)\n}","preventionTips":["Pin transformer image digests/tags and verify the tag exists in the registry","Test the transformer standalone with sample manifests before adding to skaffold.yaml","Ensure the transformer reads stdin and writes valid YAML to stdout and exits 0"],"tags":["transformer","container","render","skaffold"],"backgroundTag":"transformer-command-failed","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"}