GoogleContainerTools/skaffold · error
customTest has invalid dependencies; dependencies.ignore…
Error message
customTest has invalid dependencies; dependencies.ignore can only be used in conjunction with dependencies.paths
What it means
Validation error from validateCustomTest: a custom test sets dependencies.ignore without dependencies.paths. Ignore patterns are only meaningful as filters over an explicit paths list, so the combination is rejected with the test's YAML location.
Solutions
- Add a `paths` list alongside `ignore`, or remove the `ignore` field if using command-based dependencies
- Keep ignore only as a filter of the paths set
- Validate the dependencies block against the skaffold schema before running
Example fix
# before
- customTests:
- command: ./run-tests.sh
dependencies:
command: ./list-deps.sh
ignore: ["**/*_test.go"]
# after
- customTests:
- command: ./run-tests.sh
dependencies:
paths: ["src/**"]
ignore: ["**/*_test.go"] Defensive patterns
Strategy: validation
Validate before calling
func ignoreNeedsPaths(ct CustomTest) error {
d := ct.Dependencies
if d != nil && len(d.Ignore) > 0 && d.Paths == nil {
return fmt.Errorf("customTest dependencies.ignore requires dependencies.paths")
}
return nil
} Type guard
null
Try / catch
null
Prevention
- Use ignore only together with paths
- When migrating to command-based dependencies, drop ignore lists too
- Schema-lint skaffold.yaml before committing
When it happens
Trigger: Processing a skaffold.yaml where a customTest's `dependencies:` block has `ignore:` set while `paths` is nil/absent (typically because only `command` is set).
Common situations: Copying an ignore list from another test that used paths; removing paths during a switch to command-based dependencies but leaving ignore behind; assuming ignore applies to command output too.
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
- dependencies can use either command or paths, but not both
- custom test command must not be empty;
- custom action doesn't have containers. custom actions must…
- custom action have more than one execution mode defined…
- found duplicate container name
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/18cb76b79bcd4279.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/skaffold/schema/validation/validation.go:819
cfgErrs = append(cfgErrs, ErrorWithLocation{
Error: fmt.Errorf("custom test command must not be empty;"),
Location: cfg.YAMLInfos.Locate(&cfg.Test[i].CustomTests[j]),
})
return
}
if ct.Dependencies == nil {
continue
}
if ct.Dependencies.Command != "" && ct.Dependencies.Paths != nil {
cfgErrs = append(cfgErrs, ErrorWithLocation{
Error: fmt.Errorf("dependencies can use either command or paths, but not both"),
Location: cfg.YAMLInfos.Locate(&cfg.Test[i].CustomTests[j]),
})
}
if ct.Dependencies.Paths == nil && ct.Dependencies.Ignore != nil {
cfgErrs = append(cfgErrs, ErrorWithLocation{
Error: fmt.Errorf("customTest has invalid dependencies; dependencies.ignore can only be used in conjunction with dependencies.paths"),
Location: cfg.YAMLInfos.Locate(&cfg.Test[i].CustomTests[j]),
})
}
}
}
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 {View on GitHub (pinned to a1189de023)