{"record":{"id":"c2fce0183cae7dd4","repo":"GoogleContainerTools/skaffold","slug":"detected-incompatible-versions-v-are-incompatible","errorCode":null,"errorMessage":"detected incompatible versions:%v are incompatible with %v","messagePattern":"detected incompatible versions:(.+?) are incompatible with (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/schema/versions.go","lineNumber":352,"sourceCode":"}\n\n// getLatestFromCompatibilityCheck makes sure the schema versions in SchemaVersionsV1 and SchemaVersionsV2 are not used\n// together and returns the latest version where this VersionedConfig slice belongs to.\nfunc getLatestFromCompatibilityCheck(cfgs []util.VersionedConfig) (string, error) {\n\tvar v1Track, v2Track []string\n\tfor _, cfg := range cfgs {\n\t\tcurVersion := cfg.GetVersion()\n\t\tif matched := V1Pattern.MatchString(curVersion); matched {\n\t\t\tv1Track = append(v1Track, curVersion)\n\t\t} else if matched := V2Pattern.MatchString(curVersion); matched {\n\t\t\tv2Track = append(v2Track, curVersion)\n\t\t} else {\n\t\t\treturn \"\", fmt.Errorf(\"unknown apiVersion %v\", curVersion)\n\t\t}\n\t}\n\n\tif len(v1Track) > 0 && len(v2Track) > 0 {\n\t\treturn \"\", fmt.Errorf(\"detected incompatible versions:%v are incompatible with %v\", v1Track, v2Track)\n\t}\n\tif len(v1Track) > 0 {\n\t\treturn latestV1.Version, nil\n\t}\n\tif len(v2Track) > 0 {\n\t\treturn latest.Version, nil\n\t}\n\treturn \"\", fmt.Errorf(\"unable to find a valid API Schema version\")\n}\n\n// IsCompatibleWith checks if the cfgs versions can be upgraded to toVersion.\nfunc IsCompatibleWith(cfgs []util.VersionedConfig, toVersion string) (bool, error) {\n\tvar pattern *regexp.Regexp\n\tif matched := V1Pattern.MatchString(toVersion); matched {\n\t\tpattern = V1Pattern\n\t} else if matched := V2Pattern.MatchString(toVersion); matched {\n\t\tpattern = V2Pattern\n\t} else {","sourceCodeStart":334,"sourceCodeEnd":370,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/schema/versions.go#L334-L370","documentation":"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.","triggerScenarios":"Thrown at pkg/skaffold/schema/versions.go:352 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}