{"record":{"id":"3444a0b5bfb7ec99","repo":"GoogleContainerTools/skaffold","slug":"creating-builder-w","errorCode":null,"errorMessage":"creating builder: %w","messagePattern":"creating builder: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/runner/new.go","lineNumber":155,"sourceCode":"\n\tartifactCache, err := cache.NewCache(ctx, runCtx, isLocalImage, depLister, g, store)\n\tif err != nil {\n\t\tendTrace(instrumentation.TraceEndError(err))\n\t\treturn nil, fmt.Errorf(\"initializing cache: %w\", err)\n\t}\n\t// The Builder must be instantiated AFTER the Deployer, because the Deploy target influences\n\t// the Cluster object on the RunContext, which in turn influences whether or not we will push images.\n\tvar builder build.Builder\n\tbuilder, err = build.NewBuilderMux(runCtx, store, artifactCache, func(p latest.Pipeline) (build.PipelineBuilder, error) {\n\t\tpb, err := GetBuilder(ctx, runCtx, store, sourceDependencies, p)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn withPipelineBuildHooks(pb, p.Build.Hooks), nil\n\t})\n\tif err != nil {\n\t\tendTrace(instrumentation.TraceEndError(err))\n\t\treturn nil, fmt.Errorf(\"creating builder: %w\", err)\n\t}\n\n\tbuilder, tester, renderer, deployer = WithTimings(builder, tester, renderer, deployer, runCtx.CacheArtifacts())\n\tif runCtx.Notification() {\n\t\tdeployer = WithNotification(deployer)\n\t}\n\n\tmonitor := filemon.NewMonitor()\n\tintents, intentChan := setupIntents(runCtx)\n\trtrigger, err := trigger.NewTrigger(runCtx, intents.IsAnyAutoEnabled)\n\tif err != nil {\n\t\tendTrace(instrumentation.TraceEndError(err))\n\t\treturn nil, fmt.Errorf(\"creating watch trigger: %w\", err)\n\t}\n\n\trbuilder := NewBuilder(builder, tagger, platforms, artifactCache, runCtx)\n\treturn &SkaffoldRunner{\n\t\tBuilder:            *rbuilder,","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/runner/new.go#L137-L173","documentation":"Skaffold's NewForConfig wraps any failure that occurs while constructing the build pipeline (including build hooks wiring) with \"creating builder: %w\". It means the runner could not be created because the builder setup step returned an error, and the underlying cause is preserved via %w for errors.Is/As unwrapping.","triggerScenarios":"Calling runner.NewForConfig (via createNewRunner/createRunner) when the internal pipeline-builder construction callback returns an error — e.g. invalid build configuration, failure instantiating a builder for the configured build type, or a hook-wiring failure.","commonSituations":"Malformed skaffold.yaml build sections, unsupported builder plugins, errors from custom build hooks, or initialization failures in the artifact/build pipeline during `skaffold dev`/`run`/`render` startup.","solutions":["Read the wrapped cause after 'creating builder:' — it names the real failure","Validate skaffold.yaml with `skaffold config` / `skaffold diagnose` before running","Fix the build stanza (artifact image, builder type, context) indicated by the cause","Update Skaffold if the cause points to an unsupported builder feature"],"exampleFix":"// before: opaque handling\nrunner, err := runner.NewForConfig(runCtx)\nif err != nil { log.Fatal(err) }\n// after: inspect the wrapped cause\nrunner, err := runner.NewForConfig(runCtx)\nif err != nil {\n    log.Fatalf(\"runner init failed: %v\", err) // message includes 'creating builder: <real cause>'\n}","handlingStrategy":"try-catch","validationCode":"if err := validateRunCtx(runCtx); err != nil { return fmt.Errorf(\"invalid run context: %w\", err) }","typeGuard":null,"tryCatchPattern":"r, err := runner.NewForConfig(runCtx)\nif err != nil {\n    var inner error\n    if errors.Unwrap(err) != nil { inner = errors.Unwrap(err) }\n    return fmt.Errorf(\"runner creation failed (builder): %v / cause: %v\", err, inner)\n}","preventionTips":["Run `skaffold diagnose` to validate config before building a runner","Keep build sections minimal and schema-valid","Pin Skaffold versions in CI to avoid builder feature drift"],"tags":["skaffold","go","runner-initialization","builder"],"backgroundTag":"runner-initialization-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"}