{"record":{"id":"d2851da1fbed7315","repo":"GoogleContainerTools/skaffold","slug":"unknown-builder-for-config-v","errorCode":null,"errorMessage":"unknown builder for config %+v","messagePattern":"unknown builder for config %\\+v","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/runner/builder.go","lineNumber":76,"sourceCode":"\t\t\treturn nil, err\n\t\t}\n\t\treturn builder, nil\n\n\tcase p.Build.GoogleCloudBuild != nil:\n\t\tlog.Entry(context.TODO()).Debug(\"Using builder: google cloud\")\n\t\tbuilder := gcb.NewBuilder(bCtx, p.Build.GoogleCloudBuild)\n\t\treturn builder, nil\n\n\tcase p.Build.Cluster != nil:\n\t\tlog.Entry(context.TODO()).Debug(\"Using builder: cluster\")\n\t\tbuilder, err := cluster.NewBuilder(bCtx, p.Build.Cluster)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn builder, err\n\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unknown builder for config %+v\", p.Build)\n\t}\n}\n\ntype pipelineBuilderWithHooks struct {\n\tbuild.PipelineBuilder\n\thooksRunner hooks.Runner\n}\n\n// PreBuild executes any one-time setup required prior to starting any build on this builder,\n// followed by any Build pre-hooks set for the pipeline.\nfunc (b *pipelineBuilderWithHooks) PreBuild(ctx context.Context, out io.Writer) error {\n\tif err := b.PipelineBuilder.PreBuild(ctx, out); err != nil {\n\t\treturn err\n\t}\n\n\tif err := b.hooksRunner.RunPreHooks(ctx, out); err != nil {\n\t\treturn fmt.Errorf(\"running builder pre-hooks: %w\", err)\n\t}","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/runner/builder.go#L58-L94","documentation":"GetBuilder maps the configured build type (docker, ko, bazel, jib, kaniko, custom, etc.) to a builder implementation. This error is returned when the `p.Build` artifact type in the pipeline config matches none of the known builder cases — meaning the default branch of the type switch was reached. It dumps the whole Build config in the message for diagnosis.","triggerScenarios":"Calling GetBuilder with a pipeline whose BuildConfig holds an artifact type that no builder implementation registered for — e.g. an empty/unset build type, or a config parsed from a newer skaffold.yaml schema field this version doesn't support.","commonSituations":"Using a skaffold.yaml built for a newer/older Skaffold version with an unsupported builder; manually constructed config structs in tests with the build type left zero-valued.","solutions":["Check the `build:` section of skaffold.yaml and set a supported builder (docker, ko, bazel, jib, kaniko, custom, etc.)","Upgrade/downgrade Skaffold so it matches the schema version of the config file","If constructing config in code/tests, ensure the BuildConfig's artifact type field is populated"],"exampleFix":"// before (skaffold.yaml)\nbuild:\n  artifacts:\n    - image: app\n      # no builder specified\n// after\nbuild:\n  artifacts:\n    - image: app\n      docker:\n        dockerfile: Dockerfile","handlingStrategy":"validation","validationCode":"const supported = ['docker','ko','bazel','jib','kaniko','custom','buildpacks']\nif (!supported.includes(pipeline.build.artifactType)) {\n  throw new Error(`unsupported builder: ${pipeline.build.artifactType}`)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin Skaffold version in CI to match the schema version of your skaffold.yaml","Run `skaffold config` / `skaffold diagnose` to validate configs before builds","Never leave the build artifact type unset when constructing configs programmatically"],"tags":["build","config","builder"],"backgroundTag":"unsupported-builder-config","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"}