{"record":{"id":"c7c8e23f20a7b9e6","repo":"GoogleContainerTools/skaffold","slug":"creating-runner-w","errorCode":null,"errorMessage":"creating runner: %w","messagePattern":"creating runner: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/skaffold/app/cmd/runner.go","lineNumber":75,"sourceCode":"}\n\n// createNewRunner creates a Runner and returns the SkaffoldConfig associated with it.\nfunc createNewRunner(ctx context.Context, out io.Writer, opts config.SkaffoldOptions) (runner.Runner, []util.VersionedConfig, *runcontext.RunContext, error) {\n\trunCtx, configs, err := runContext(ctx, out, opts)\n\tif err != nil {\n\t\treturn nil, nil, nil, err\n\t}\n\n\tvar v2Configs []*latest.SkaffoldConfig\n\tfor _, c := range configs {\n\t\tv2Configs = append(v2Configs, c.(*latest.SkaffoldConfig))\n\t}\n\tinstrumentation.Init(v2Configs, opts.User, runCtx.GetKubeContext())\n\thooks.SetupStaticEnvOptions(runCtx)\n\trunner, err := runner.NewForConfig(ctx, runCtx)\n\tif err != nil {\n\t\tevent.InititializationFailed(err)\n\t\treturn nil, nil, nil, fmt.Errorf(\"creating runner: %w\", err)\n\t}\n\treturn runner, configs, runCtx, nil\n}\n\nfunc runContext(ctx context.Context, out io.Writer, opts config.SkaffoldOptions) (*runcontext.RunContext, []util.VersionedConfig, error) {\n\tcfgSet, err := withFallbackConfig(ctx, out, opts, parser.GetConfigSet)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tsetDefaultRendererAndDeployer(cfgSet)\n\n\tif err := validation.Process(cfgSet, validation.GetValidationOpts(opts)); err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"invalid skaffold config: %w\", err)\n\t}\n\tvar configs []util.VersionedConfig\n\tfor _, cfg := range cfgSet {\n\t\tconfigs = append(configs, cfg.SkaffoldConfig)\n\t}","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/cmd/skaffold/app/cmd/runner.go#L57-L93","documentation":"Skaffold failed to construct its runner from the loaded configuration set. runner.NewForConfig validates the configs and selects renderer/deployer implementations; any error there is wrapped as 'creating runner' and triggers the InitializationFailed event.","triggerScenarios":"Calling any skaffold command that creates a runner (run, dev, debug, deploy) where runner.NewForConfig returns an error: unsupported config schema version, invalid renderer/deployer combination, or internal config incompatibilities after defaults are applied.","commonSituations":"skaffold.yaml uses apiVersion not supported by the installed skaffold binary; mixing configs from multiple files that disagree on deployer type; upgrading skaffold past the config's schema version.","solutions":["Check the wrapped cause after 'creating runner:' for the specific incompatibility","Verify skaffold.yaml apiVersion is supported: run `skaffold config list` or check skaffold version compatibility","Run `skaffold fix` to migrate an old schema to the current version","Simplify or split multi-config setups that mix incompatible deployers"],"exampleFix":"// before\napiVersion: skaffold/v1beta2\nkind: Config\n// after\nskaffold fix\n# -> apiVersion: skaffold/v4beta7\nkind: Config","handlingStrategy":"validation","validationCode":"if ! skaffold config list >/dev/null 2>&1; then echo 'skaffold cannot read config'; fi\nskaffold fix --overwrite 2>/dev/null || true # migrate old schemas first","typeGuard":null,"tryCatchPattern":"runner, configs, runCtx, err := createNewRunner(ctx, out, opts)\nif err != nil {\n\tif strings.Contains(err.Error(), \"creating runner:\") {\n\t\treturn fmt.Errorf(\"runner init failed (check skaffold.yaml apiVersion): %w\", err)\n\t}\n\treturn err\n}","preventionTips":["Keep skaffold.yaml apiVersion compatible with the installed skaffold version","Run `skaffold fix` after upgrading skaffold","Test config changes with `skaffold diagnose` before run/dev","Pin skaffold version in CI to match schema versions used"],"tags":["skaffold","runner","config","initialization"],"backgroundTag":"runner-creation-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"}