{"record":{"id":"427f880df7c99936","repo":"GoogleContainerTools/skaffold","slug":"computing-modtimes-w","errorCode":null,"errorMessage":"computing modTimes: %w","messagePattern":"computing modTimes: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/diagnose/diagnose.go","lineNumber":94,"sourceCode":"\t\t\t\ttimeSyncMap1, err := timeToConstructSyncMap(ctx, artifact, cfg)\n\t\t\t\tif err != nil {\n\t\t\t\t\tif _, isNotSupported := err.(build.ErrSyncMapNotSupported); !isNotSupported {\n\t\t\t\t\t\treturn fmt.Errorf(\"constructing inferred sync map: %w\", err)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttimeSyncMap2, err := timeToConstructSyncMap(ctx, artifact, cfg)\n\t\t\t\tif err != nil {\n\t\t\t\t\tif _, isNotSupported := err.(build.ErrSyncMapNotSupported); !isNotSupported {\n\t\t\t\t\t\treturn fmt.Errorf(\"constructing inferred sync map: %w\", err)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfmt.Fprintf(out, \" - Time to construct sync map: %v (2nd time: %v)\\n\", timeSyncMap1, timeSyncMap2)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttimeMTimes1, err := timeToComputeMTimes(deps)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"computing modTimes: %w\", err)\n\t\t\t}\n\t\t\ttimeMTimes2, err := timeToComputeMTimes(deps)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"computing modTimes: %w\", err)\n\t\t\t}\n\n\t\t\tfmt.Fprintf(out, \" - Time to compute mTimes on dependencies: %v (2nd time: %v)\\n\", timeMTimes1, timeMTimes2)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc typeOfArtifact(a *latest.Artifact) string {\n\tswitch {\n\tcase a.DockerArtifact != nil:\n\t\treturn \"Docker artifact\"\n\tcase a.BazelArtifact != nil:\n\t\treturn \"Bazel artifact\"","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/diagnose/diagnose.go#L76-L112","documentation":"After listing dependencies, CheckArtifacts times computing modification times of all dependency files via filemon.Stat. If stat'ing any dependency fails on the first pass, the error is wrapped with this message.","triggerScenarios":"Running `skaffold diagnose` where one or more files in the artifact's dependency list cannot be stat'ed — deleted files, broken symlinks, permission-denied paths, or dependency generators returning stale paths.","commonSituations":"Stale build cache referencing deleted files; dependency lists including generated files that don't exist yet; permission issues on mounted volumes or CI containers running as non-root.","solutions":["Inspect the wrapped error for the specific file that failed to stat","Clean and rebuild (skaffold clean && skaffold build) to regenerate the dependency list","Check permissions on the workspace directory for the user running skaffold","Remove broken symlinks or regenerate missing generated files before diagnose"],"exampleFix":"// before: dependency file deleted\nskaffold diagnose\n// error: computing modTimes: stat /path/generated.go: no such file\n// after: regenerate it\nmake generate && skaffold diagnose","handlingStrategy":"validation","validationCode":"deps, err := sourceDependencies.SingleArtifactDependencies(ctx, artifact, tag)\nif err != nil { return err }\nfor _, d := range deps {\n\tif _, err := os.Stat(d); err != nil {\n\t\treturn fmt.Errorf(\"dependency missing before diagnose: %s\", d)\n\t}\n}","typeGuard":null,"tryCatchPattern":"if err := CheckArtifacts(ctx, cfg, tags, out); err != nil && strings.Contains(err.Error(), \"computing modTimes\") {\n\tlog.Warnf(\"some dependency files are missing or unreadable: %v\", err)\n}","preventionTips":["Generate all generated files before running diagnose","Clean stale caches (skaffold clean) after deleting sources","Run skaffold as a user with read access to the workspace"],"tags":["skaffold","filesystem","diagnose"],"backgroundTag":"file-stat-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"}