GoogleContainerTools/skaffold · error
source: %s, %s on line %d column %d
Error message
source: %s, %s on line %d column %d
What it means
The located variant of wrapWithContext: it wraps a validation error with 'source: <file>, <config id> on line L column C' when the error carries a valid parse Location. This points the developer to the exact position in skaffold.yaml that failed validation.
Source
Thrown at pkg/skaffold/schema/validation/validation.go:841
}
}
return
}
func wrapWithContext(config *parser.SkaffoldConfigEntry, errs ...ErrorWithLocation) []ErrorWithLocation {
var id string
if config.Metadata.Name != "" {
id = fmt.Sprintf("in module %q", config.Metadata.Name)
} else {
id = fmt.Sprintf("in unnamed config[%d]", config.SourceIndex)
}
for i := range errs {
if errs[i].Location == nil || errs[i].Location.StartLine == -1 {
errs[i].Error = errors.Wrapf(errs[i].Error, "source: %s, %s", config.SourceFile, id)
continue
}
errs[i].Error = errors.Wrapf(errs[i].Error, "source: %s, %s on line %d column %d",
config.SourceFile, id, errs[i].Location.StartLine, errs[i].Location.StartColumn)
}
return errs
}
// validateKubectlManifests
// - validates that kubectl manifest files specified in the skaffold config exist
func validateKubectlManifests(configs parser.SkaffoldConfigSet) (errs []ErrorWithLocation) {
for _, c := range configs {
if c.IsRemote {
continue
}
if len(c.Render.RawK8s) == 1 && c.Render.RawK8s[0] == constants.DefaultKubectlManifests[0] {
log.Entry(context.TODO()).Debug("skipping validating `kubectl` deployer manifests since only the default manifest list is defined")
continue
}
// validate that manifest files referenced in config existView on GitHub (pinned to a1189de023)
Solutions
- Open skaffold.yaml at the reported line/column and correct the offending value
- Check image name constraints (lowercase, no underscores, valid registry) if validateImageNames flagged it
- Run `skaffold fix` to auto-upgrade schema-incompatible fields
- Run `skaffold diagnose` to surface all validation issues at once
Example fix
// before (skaffold.yaml line 12) image: Registry/MyImage:latest // after image: registry.example.com/myimage:latest
Defensive patterns
Strategy: validation
Validate before calling
// Parse and lint skaffold.yaml against the schema before use
parsed, err := schema.ParseConfig([]byte(cfgYAML), version)
if err != nil {
return fmt.Errorf("invalid skaffold.yaml at line %d: %w", lineOf(err), err)
} Try / catch
if err := process(config); err != nil {
// message includes "source: file, id on line L column C"
return fmt.Errorf("skaffold validation: %w", err)
} Prevention
- Fix errors at the reported line/column in skaffold.yaml immediately after edits
- Use an editor schema (JSON schema for skaffold.yaml) for inline validation
- Run skaffold validation as a pre-commit hook
When it happens
Trigger: Any validation error from Process/validateImageNames/validateKubectlManifests whose errs[i].Location has a valid StartLine (not -1) — i.e. errors traceable to a specific token in the parsed config file.
Common situations: Typo'd field names or bad values at a known line of skaffold.yaml; invalid image repository names; kubectl manifest paths failing validation; hand-edited skaffold.yaml with schema violations.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- source: %s, %s
- cannot add an empty image value
- response must be a number, or empty
- strings.Join(messages, "\n")
- strings.Join(messages, " \n ")
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/a1d58f0408b2374a.
Report an issue: GitHub.