{"record":{"id":"db0afc19b033b27f","repo":"GoogleContainerTools/skaffold","slug":"failed-to-create-manifest-file-w","errorCode":null,"errorMessage":"failed to create manifest file: %w","messagePattern":"failed to create manifest file: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/kubernetes/manifest/url.go","lineNumber":63,"sourceCode":"\t\tpaths = append(paths, out)\n\t}\n\treturn paths, nil\n}\n\nfunc downloadFromURL(destDir string, manifest string) (string, error) {\n\tif manifest == \"\" || !util.IsURL(manifest) {\n\t\treturn \"\", fmt.Errorf(\"%s is not a valid URL\", manifest)\n\t}\n\n\tresp, err := http.Get(manifest)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to download manifest from %s, err : %w\", manifest, err)\n\t}\n\tdefer resp.Body.Close()\n\n\tf, err := os.CreateTemp(destDir, \"*.yaml\")\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to create manifest file: %w\", err)\n\t}\n\tdefer f.Close()\n\t_, err = io.Copy(f, resp.Body)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to write manifest to file, err: %w\", err)\n\t}\n\n\treturn f.Name(), nil\n}\n","sourceCodeStart":45,"sourceCodeEnd":73,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/kubernetes/manifest/url.go#L45-L73","documentation":"Once the manifest is downloaded, downloadFromURL creates a temp file (*.yaml) inside the staging dir with os.CreateTemp. If file creation fails, the error is wrapped as 'failed to create manifest file'.","triggerScenarios":"os.CreateTemp failing in destDir because the directory does not exist (MkdirAll failed silently upstream is not possible — here mostly permission denied, disk full, or too many open files).","commonSituations":"Read-only or full filesystem; running as non-root in a container without write access to the tmp dir; fd exhaustion in long-running processes.","solutions":["Ensure the staging tmp directory is writable by the current user","Free disk space / check inodes","Check ulimit -n for file-descriptor exhaustion and close leaking handles"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if st, err := os.Stat(destDir); err != nil || !st.IsDir() {\n    return fmt.Errorf(\"dest dir %q unusable: %w\", destDir, err)\n}","typeGuard":null,"tryCatchPattern":"if err != nil {\n    if errors.Is(err, os.ErrPermission) || errors.Is(err, syscall.ENOSPC) {\n        // fix permissions / free space, then retry\n    }\n    return err\n}","preventionTips":["Run Skaffold as a user with write access to its temp dir","Monitor disk space and open-file limits (ulimit -n) in CI","Avoid read-only root filesystems without a writable tmp mount"],"tags":["filesystem","io","tempfile"],"backgroundTag":"temp-file-creation-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"}