GoogleContainerTools/skaffold · error
detected incompatible versions:%v are incompatible with %v
Error message
detected incompatible versions:%v are incompatible with %v
What it means
Fires in getLatestFromCompatibilityCheck when the config set mixes V1-track (skaffold.vX) and V2-track (skaffold/vX) apiVersions across configs (e.g. a base config and an overlay). The two schema tracks are mutually incompatible and cannot be processed together.
Source
Thrown at pkg/skaffold/schema/versions.go:352
}
// getLatestFromCompatibilityCheck makes sure the schema versions in SchemaVersionsV1 and SchemaVersionsV2 are not used
// together and returns the latest version where this VersionedConfig slice belongs to.
func getLatestFromCompatibilityCheck(cfgs []util.VersionedConfig) (string, error) {
var v1Track, v2Track []string
for _, cfg := range cfgs {
curVersion := cfg.GetVersion()
if matched := V1Pattern.MatchString(curVersion); matched {
v1Track = append(v1Track, curVersion)
} else if matched := V2Pattern.MatchString(curVersion); matched {
v2Track = append(v2Track, curVersion)
} else {
return "", fmt.Errorf("unknown apiVersion %v", curVersion)
}
}
if len(v1Track) > 0 && len(v2Track) > 0 {
return "", fmt.Errorf("detected incompatible versions:%v are incompatible with %v", v1Track, v2Track)
}
if len(v1Track) > 0 {
return latestV1.Version, nil
}
if len(v2Track) > 0 {
return latest.Version, nil
}
return "", fmt.Errorf("unable to find a valid API Schema version")
}
// IsCompatibleWith checks if the cfgs versions can be upgraded to toVersion.
func IsCompatibleWith(cfgs []util.VersionedConfig, toVersion string) (bool, error) {
var pattern *regexp.Regexp
if matched := V1Pattern.MatchString(toVersion); matched {
pattern = V1Pattern
} else if matched := V2Pattern.MatchString(toVersion); matched {
pattern = V2Pattern
} else {View on GitHub (pinned to a1189de023)
Solutions
- Make all configs use apiVersions on the same track (all V1-style or all V2-style)
- Run `skaffold fix` on the older configs to migrate them to the current track
- Remove or stop overlaying the incompatible config file
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/skaffold/schema/versions.go:352 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/c2fce0183cae7dd4.
Report an issue: GitHub.