{"record":{"id":"6558f049b3d87abf","repo":"GoogleContainerTools/skaffold","slug":"loading-manifests-w","errorCode":null,"errorMessage":"loading manifests: %w","messagePattern":"loading manifests: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/skaffold/app/cmd/filter.go","lineNumber":94,"sourceCode":"\t\t\tstdoutPipe, err := cmd.StdoutPipe()\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"running post-renderer: %w\", err)\n\t\t\t}\n\t\t\terr = cmd.Start()\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"running post-renderer: %w\", err)\n\t\t\t}\n\n\t\t\tmanifestList, err = manifest.Load(stdoutPipe)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"loading post-renderer result: %w\", err)\n\t\t\t}\n\t\t\tstdoutPipe.Close()\n\t\t} else {\n\t\t\tmanifestList, err = manifest.Load(os.Stdin)\n\t\t}\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"loading manifests: %w\", err)\n\t\t}\n\t\tvar ass applysetters.ApplySetters\n\t\tmanifestOverrides := pkgutil.EnvSliceToMap(opts.ManifestsOverrides, \"=\")\n\t\tfor k, v := range manifestOverrides {\n\t\t\tass.Setters = append(ass.Setters, applysetters.Setter{Name: k, Value: v})\n\t\t}\n\t\tmanifestList, err = ass.Apply(ctx, manifestList)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tallow, deny := getTransformList(configs)\n\n\t\tmanifestList, err = manifestList.SetLabels(pkgutil.EnvSliceToMap(opts.CustomLabels, \"=\"),\n\t\t\tmanifest.NewResourceSelectorLabels(allow, deny))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tmanifestList, err = manifestList.ReplaceImages(ctx, buildArtifacts, manifest.NewResourceSelectorImages(allow, deny))","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/cmd/skaffold/app/cmd/filter.go#L76-L112","documentation":"Fires in `skaffold filter` when the Kubernetes manifests passed on stdin (or produced by a post-renderer) cannot be parsed by manifest.Load. Wraps the underlying parse failure, typically malformed YAML, non-manifest documents, or a crashing post-renderer producing invalid output.","triggerScenarios":"--post-renderer is not set (or the post-renderer branch completed) and manifest.Load(os.Stdin) returns an error because stdin contains invalid/empty YAML, wrapped at filter.go:94.","commonSituations":"Running `skaffold filter` without piping manifests into stdin, upstream command in a pipe failed silently, or the upstream output is not valid Kubernetes YAML.","solutions":["Pipe valid manifest YAML into the command: kustomize build . | skaffold filter ...","Check that the upstream command in the pipeline succeeded","Validate the YAML independently (e.g. kubectl apply --dry-run=client -f -)","Inspect the wrapped error for the exact parse problem"],"exampleFix":"// before\nskaffold filter   # no stdin, empty input\n// after\nkustomize build . | skaffold filter","handlingStrategy":"validation","validationCode":"// before running skaffold filter\ninfo, _ := os.Stdin.Stat()\nif (info.Mode() & os.ModeCharDevice) != 0 {\n    return fmt.Errorf(\"skaffold filter requires manifests piped on stdin\")\n}","typeGuard":null,"tryCatchPattern":"if err != nil {\n    return fmt.Errorf(\"loading manifests: %w\", err)\n}","preventionTips":["Always pipe valid manifest YAML into skaffold filter","Check upstream pipeline commands succeeded (set -o pipefail in bash)","Dry-run the YAML with kubectl before filtering"],"tags":["cli","manifest","stdin","yaml"],"backgroundTag":"manifest-parse-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"}