{"record":{"id":"d07f6becfd90b522","repo":"GoogleContainerTools/skaffold","slug":"source-s-s","errorCode":null,"errorMessage":"source: %s, %s","messagePattern":"source: (.+?), (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/schema/validation/validation.go","lineNumber":838,"sourceCode":"\t\t\t\t\tLocation: cfg.YAMLInfos.Locate(&cfg.Test[i].CustomTests[j]),\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\treturn\n}\n\nfunc wrapWithContext(config *parser.SkaffoldConfigEntry, errs ...ErrorWithLocation) []ErrorWithLocation {\n\tvar id string\n\tif config.Metadata.Name != \"\" {\n\t\tid = fmt.Sprintf(\"in module %q\", config.Metadata.Name)\n\t} else {\n\t\tid = fmt.Sprintf(\"in unnamed config[%d]\", config.SourceIndex)\n\t}\n\n\tfor i := range errs {\n\t\tif errs[i].Location == nil || errs[i].Location.StartLine == -1 {\n\t\t\terrs[i].Error = errors.Wrapf(errs[i].Error, \"source: %s, %s\", config.SourceFile, id)\n\t\t\tcontinue\n\t\t}\n\t\terrs[i].Error = errors.Wrapf(errs[i].Error, \"source: %s, %s on line %d column %d\",\n\t\t\tconfig.SourceFile, id, errs[i].Location.StartLine, errs[i].Location.StartColumn)\n\t}\n\treturn errs\n}\n\n// validateKubectlManifests\n// - validates that kubectl manifest files specified in the skaffold config exist\nfunc validateKubectlManifests(configs parser.SkaffoldConfigSet) (errs []ErrorWithLocation) {\n\tfor _, c := range configs {\n\t\tif c.IsRemote {\n\t\t\tcontinue\n\t\t}\n\t\tif len(c.Render.RawK8s) == 1 && c.Render.RawK8s[0] == constants.DefaultKubectlManifests[0] {\n\t\t\tlog.Entry(context.TODO()).Debug(\"skipping validating `kubectl` deployer manifests since only the default manifest list is defined\")\n\t\t\tcontinue","sourceCodeStart":820,"sourceCodeEnd":856,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/schema/validation/validation.go#L820-L856","documentation":"wrapWithContext annotates every validation error collected while parsing/validating a skaffold config with the source file and config identity. When the error has no location info, this short form (without line/column) is used, prefixing 'source: <file>, in named config X / in unnamed config[N>'. It tells the developer which file/config produced the schema/validation error.","triggerScenarios":"Running `skaffold` commands (via Process) whose validation errors (from validateImageNames, validateKubectlManifests, etc.) lack a source Location, or whose Location.StartLine == -1. Common with programmatically generated configs or errors not tied to a specific parsed line.","commonSituations":"Invalid image names in skaffold.yaml; malformed kubectl manifests referenced from the config; configs loaded without location metadata (e.g. from stdin or generated pipelines); older configs missing fields added by schema upgrades.","solutions":["Read the 'source:' prefix to find the offending skaffold.yaml and config id, then fix the reported field in that file","Run `skaffold fix` to migrate the config to the current schema version","Validate locally with `skaffold diagnose` or `skaffold config` before deploying","If the error is from a generated config, regenerate with correct image names/manifest paths"],"exampleFix":"// before\nimage: My_Invalid_Image\n// after\nimage: my-valid-image","handlingStrategy":"validation","validationCode":"// Pre-validate config files before running skaffold\nfor _, f := range configFiles {\n    if err := validateSkaffoldYAML(f); err != nil {\n        return fmt.Errorf(\"skaffold config invalid in %s: %w\", f, err)\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := skaffoldProcess(cfg); err != nil {\n    var validationErrs []error\n    if errors.As(err, &validationErrs) {\n        for _, ve := range validationErrs { log.Printf(\"config error: %v\", ve) }\n    }\n    return err\n}","preventionTips":["Run `skaffold diagnose` in CI before deploying","Keep skaffold.yaml schema version current via `skaffold fix`","Validate image names follow docker registry constraints (lowercase, no underscores)"],"tags":["validation","skaffold-config","schema"],"backgroundTag":"schema-validation-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"}