{"record":{"id":"0ab3c82a650c8395","repo":"GoogleContainerTools/skaffold","slug":"watching-files-for-deployer-w","errorCode":null,"errorMessage":"watching files for deployer: %w","messagePattern":"watching files for deployer: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/runner/dev.go","lineNumber":444,"sourceCode":"\tif err := r.monitor.Register(\n\t\tr.renderer.ManifestDeps,\n\t\tfunc(filemon.Events) { r.changeSet.Redeploy() },\n\t); err != nil {\n\t\tevent.DevLoopFailedWithErrorCode(r.devIteration, proto.StatusCode_DEVINIT_REGISTER_RENDER_DEPS, err)\n\t\teventV2.TaskFailed(constants.DevLoop, err)\n\t\tendTrace()\n\t\treturn fmt.Errorf(\"watching files for renderer: %w\", err)\n\t}\n\n\t// Watch deployment configuration\n\tif err := r.monitor.Register(\n\t\tr.deployer.Dependencies,\n\t\tfunc(filemon.Events) { r.changeSet.Redeploy() },\n\t); err != nil {\n\t\tevent.DevLoopFailedWithErrorCode(r.devIteration, proto.StatusCode_DEVINIT_REGISTER_DEPLOY_DEPS, err)\n\t\teventV2.TaskFailed(constants.DevLoop, err)\n\t\tendTrace()\n\t\treturn fmt.Errorf(\"watching files for deployer: %w\", err)\n\t}\n\n\t// Watch Skaffold configuration\n\tif err := r.monitor.Register(\n\t\tfunc() ([]string, error) { return []string{r.runCtx.ConfigurationFile()}, nil },\n\t\tfunc(filemon.Events) { r.changeSet.Reload() },\n\t); err != nil {\n\t\tevent.DevLoopFailedWithErrorCode(r.devIteration, proto.StatusCode_DEVINIT_REGISTER_CONFIG_DEP, err)\n\t\teventV2.TaskFailed(constants.DevLoop, err)\n\t\tendTrace()\n\t\treturn fmt.Errorf(\"watching skaffold configuration %q: %w\", r.runCtx.ConfigurationFile(), err)\n\t}\n\n\tlog.Entry(ctx).Infoln(\"List generated in\", timeutil.Humanize(time.Since(start)))\n\tlog.Entry(ctx).Infoln(\"Dev loop completed in\", timeutil.Humanize(time.Since(devStart)))\n\n\t// Init Sync State\n\tif err := sync.Init(ctx, artifacts); err != nil {","sourceCodeStart":426,"sourceCodeEnd":462,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/runner/dev.go#L426-L462","documentation":"Dev() registers the deployer's dependencies (manifest files the deployer consumes) with the file monitor so changes trigger redeploy. Failure emits DEVINIT_REGISTER_DEPLOY_DEPS and returns 'watching files for deployer', aborting dev mode during init.","triggerScenarios":"`r.monitor.Register(r.deployer.Dependencies, ...)` errors — the deployer (kubectl/helm/kpt) cannot enumerate its input manifests, e.g. kustomize build fails while listing dependencies, or the watcher registration fails.","commonSituations":"kubectl deployer given kustomize paths that don't build; helm values files missing; remote bases unresolvable; file permission errors; inotify watch exhaustion.","solutions":["Fix the deploy manifest paths in skaffold.yaml so dependency enumeration succeeds","Validate manifests standalone: `kustomize build <dir>` or `helm template`","Check file permissions on the referenced manifest files","Raise inotify watch limits if the watcher cannot be created"],"exampleFix":"// before\ndeploy:\n  kustomize: {paths: ['k8s/base']}  # base has broken reference\n// after\ndeploy:\n  kustomize: {paths: ['k8s/overlays/dev']}","handlingStrategy":"validation","validationCode":"// pre-validate deployer dependencies\nif err := exec.Command(\"kustomize\", \"build\", deployDir).Run(); err != nil {\n    return fmt.Errorf(\"kustomize build failed before dev: %w\", err)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate manifests with kustomize build / helm template before dev","Keep deploy manifests readable and in-repo","Avoid broken remote bases","Monitor inotify limits"],"tags":["skaffold","file-watch","deploy","kubernetes"],"backgroundTag":"file-watch-registration-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"}