{"record":{"id":"ecccca9ab225a66a","repo":"GoogleContainerTools/skaffold","slug":"executing-build-w-ecccca","errorCode":null,"errorMessage":"executing build: %w","messagePattern":"executing build: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/skaffold/app/cmd/render.go","lineNumber":74,"sourceCode":"\tbuildOut := io.Discard\n\tif showBuild {\n\t\tbuildOut = out\n\t}\n\n\treturn withRunner(ctx, out, func(r runner.Runner, configs []util.VersionedConfig) error {\n\t\tvar bRes []graph.Artifact\n\t\tvar err error\n\n\t\tif fromBuildOutputFile.String() != \"\" || len(preBuiltImages.GetSlice()) > 0 {\n\t\t\t// pass `nil` as render shouldn't build if provided --build-artifacts or --images\n\t\t\tbRes, err = getBuildArtifactsAndSetTags(nil, r.ApplyDefaultRepo)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"loading artifacts: %w\", err)\n\t\t\t}\n\t\t} else {\n\t\t\tbRes, err = r.Build(ctx, buildOut, targetArtifacts(opts, configs))\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"executing build: %w\", err)\n\t\t\t}\n\t\t}\n\n\t\tmanifests, err := r.Render(ctx, out, bRes, offline)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"rendering manifests: %w\", err)\n\t\t}\n\t\treturn manifest.Write(manifests.String(), opts.RenderOutput, out)\n\t})\n}\n","sourceCodeStart":56,"sourceCodeEnd":85,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/cmd/skaffold/app/cmd/render.go#L56-L85","documentation":"In `skaffold render`, when no pre-built images are supplied, render builds the target artifacts itself via `r.Build`. This wrapper reports any build failure. It means the build step (kaniko, docker, jib, etc.) failed while render was producing manifests, so there are no tagged images to render with.","triggerScenarios":"`skaffold render` without --build-artifacts/--images where the underlying build fails: Dockerfile syntax error, missing base image, buildkit daemon unreachable, out-of-disk build context, compile errors in the source, or jib/gradle/maven failures.","commonSituations":"Docker daemon not running or not accessible; source code does not compile; Dockerfile FROM image not pullable (private registry auth); file-sync/context too large; running render remotely where local images aren't available.","solutions":["Run `skaffold build` (or `skaffold dev`) directly to see the full underlying build error.","Fix the reported build issue: Dockerfile errors, missing dependencies, or compile failures.","Confirm the Docker daemon/container runtime is running and reachable.","If you only want to render, skip building by passing pre-built artifacts: `skaffold render --build-artifacts artifacts.json`."],"exampleFix":"// before: render tries to build and fails on daemon down\nskaffold render\n// after: use pre-built artifacts so render never builds\nskaffold build -q > artifacts.json\nskaffold render --build-artifacts artifacts.json\n","handlingStrategy":"try-catch","validationCode":"// Pre-flight checks before a render that builds\nconst dockerOk = (() => { try { execSync('docker info', {stdio: 'ignore'}); return true; } catch { return false; } })();\nif (!dockerOk) throw new Error('Docker daemon unreachable; skaffold render would fail building');\n// and confirm the source compiles/builds cheaply first:\nexecFileSync('skaffold', ['build', '-q'], {stdio: 'pipe'}); // isolate build failures from render","typeGuard":null,"tryCatchPattern":"try {\n  execFileSync('skaffold', ['render'], {stdio: 'pipe'});\n} catch (e) {\n  const msg = e.stderr?.toString() ?? '';\n  if (msg.includes('executing build')) {\n    console.error('Render-time build failed; run `skaffold build` to see the raw error.');\n    // fallback: render with pre-built artifacts\n    execFileSync('skaffold', ['render', '--build-artifacts', 'artifacts.json']);\n  } else throw e;\n}","preventionTips":["Prefer the two-step flow: `skaffold build -q > artifacts.json` then `render --build-artifacts`, so build errors surface in isolation.","Ensure the Docker daemon/runtime is healthy before CI render steps.","Authenticate to private registries (base images) before building.","Cache build layers (--cache-artifacts) to reduce flaky build failures."],"tags":["skaffold","build","docker","render"],"backgroundTag":"build-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"}