GoogleContainerTools/skaffold · error
opening hydrated manifest at %s: %w
Error message
opening hydrated manifest at %s: %w
What it means
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.
Source
Thrown at pkg/skaffold/deploy/util/util.go:183
for _, r := range resources.APIResources {
if r.Kind == gvk.Kind {
return r.Namespaced, schema.GroupVersionResource{
Group: gvk.Group,
Version: gvk.Version,
Resource: r.Name,
}, nil
}
}
return false, schema.GroupVersionResource{}, fmt.Errorf("could not find resource for %s", gvk.String())
}
func GetManifestsFromHydratedManifests(ctx context.Context, hydratedManifests []string) (manifest.ManifestList, error) {
var manifests manifest.ManifestList
for _, path := range hydratedManifests {
f, err := os.Open(path)
if err != nil {
return nil, fmt.Errorf("opening hydrated manifest at %s: %w", path, err)
}
defer f.Close()
ms, err := manifest.Load(f)
if err != nil {
return nil, fmt.Errorf("parsing manifests file into manifest list object: %w", err)
}
manifests = append(manifests, ms...)
}
return manifests, nil
}
type tagErr struct {
tag string
err error
}
// ImageTags generates tags for a list of artifactsView on GitHub (pinned to a1189de023)
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
Example fix
// before
f, err := os.Open(path)
if err != nil {
return nil, fmt.Errorf("opening hydrated manifest at %s: %w", path, err)
}
// after
if _, err := os.Stat(path); err != nil {
return nil, fmt.Errorf("hydrated manifest missing at %s: %w", path, err)
}
f, err := os.Open(path)
if err != nil {
return nil, fmt.Errorf("opening hydrated manifest at %s: %w", path, err)
} Defensive patterns
Strategy: validation
Validate before calling
func validateHydratedManifests(paths []string) error {
for _, p := range paths {
info, err := os.Stat(p)
if err != nil {
return fmt.Errorf("hydrated manifest %s missing: %w", p, err)
}
if info.IsDir() {
return fmt.Errorf("hydrated manifest %s is a directory", p)
}
}
return nil
} Try / catch
manifests, err := GetManifestsFromHydratedManifests(ctx, paths)
if err != nil {
var pathErr *fs.PathError
if errors.As(err, &pathErr) {
return fmt.Errorf("re-run hydrate step; manifest unreadable: %w", err)
}
return err
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- CONFIG_MISSING_MANIFEST_FILE_ERR
- rendering manifests: %w
- rendering manifests: %w
- could not read the hydrated manifest from %v: %w
- kubectl create: %w
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/7d8f3d7052df1da4.
Report an issue: GitHub.