{"record":{"id":"7d8f3d7052df1da4","repo":"GoogleContainerTools/skaffold","slug":"opening-hydrated-manifest-at-s-w","errorCode":null,"errorMessage":"opening hydrated manifest at %s: %w","messagePattern":"opening hydrated manifest at (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/deploy/util/util.go","lineNumber":183,"sourceCode":"\tfor _, r := range resources.APIResources {\n\t\tif r.Kind == gvk.Kind {\n\t\t\treturn r.Namespaced, schema.GroupVersionResource{\n\t\t\t\tGroup:    gvk.Group,\n\t\t\t\tVersion:  gvk.Version,\n\t\t\t\tResource: r.Name,\n\t\t\t}, nil\n\t\t}\n\t}\n\n\treturn false, schema.GroupVersionResource{}, fmt.Errorf(\"could not find resource for %s\", gvk.String())\n}\n\nfunc GetManifestsFromHydratedManifests(ctx context.Context, hydratedManifests []string) (manifest.ManifestList, error) {\n\tvar manifests manifest.ManifestList\n\tfor _, path := range hydratedManifests {\n\t\tf, err := os.Open(path)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"opening hydrated manifest at %s: %w\", path, err)\n\t\t}\n\t\tdefer f.Close()\n\t\tms, err := manifest.Load(f)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"parsing manifests file into manifest list object: %w\", err)\n\t\t}\n\t\tmanifests = append(manifests, ms...)\n\t}\n\n\treturn manifests, nil\n}\n\ntype tagErr struct {\n\ttag string\n\terr error\n}\n\n// ImageTags generates tags for a list of artifacts","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/deploy/util/util.go#L165-L201","documentation":"GetManifestsFromHydratedManifests iterates over hydrated manifest file paths and opens each with os.Open. If any file cannot be opened (missing, permission denied, wrong path), this error is thrown wrapping the os error with the path. It aborts loading the full manifest list for deployment.","triggerScenarios":"Calling GetManifestsFromHydratedManifests with a path that does not exist, is a directory, or is not readable by the current user; a hydrate step that silently failed and left no output file.","commonSituations":"Skaffold hydrate/transform phase didn't run or wrote to a different directory; relative vs absolute path confusion; running in a container where the manifests volume isn't mounted; file deleted between hydrate and deploy.","solutions":["Verify each path exists: ls <path> and correct the hydratedManifests list","Ensure the hydrate step completed successfully before deploy (check hydrate logs)","Fix file permissions or run as a user that can read the manifests","Use absolute paths if the working directory differs between hydrate and deploy"],"exampleFix":"// before\nf, err := os.Open(path)\nif err != nil {\n\treturn nil, fmt.Errorf(\"opening hydrated manifest at %s: %w\", path, err)\n}\n// after\nif _, err := os.Stat(path); err != nil {\n\treturn nil, fmt.Errorf(\"hydrated manifest missing at %s: %w\", path, err)\n}\nf, err := os.Open(path)\nif err != nil {\n\treturn nil, fmt.Errorf(\"opening hydrated manifest at %s: %w\", path, err)\n}","handlingStrategy":"validation","validationCode":"func validateHydratedManifests(paths []string) error {\n\tfor _, p := range paths {\n\t\tinfo, err := os.Stat(p)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"hydrated manifest %s missing: %w\", p, err)\n\t\t}\n\t\tif info.IsDir() {\n\t\t\treturn fmt.Errorf(\"hydrated manifest %s is a directory\", p)\n\t\t}\n\t}\n\treturn nil\n}","typeGuard":null,"tryCatchPattern":"manifests, err := GetManifestsFromHydratedManifests(ctx, paths)\nif err != nil {\n\tvar pathErr *fs.PathError\n\tif errors.As(err, &pathErr) {\n\t\treturn fmt.Errorf(\"re-run hydrate step; manifest unreadable: %w\", err)\n\t}\n\treturn err\n}","preventionTips":["Check hydrate step exit status before running deploy","Use absolute paths for hydrated manifests","Verify output files exist after generation in CI","Avoid passing non-manifest files into hydratedManifests"],"tags":["filesystem","manifests","kubernetes"],"backgroundTag":"file-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"}