{"record":{"id":"1eed0c71fc2960c3","repo":"GoogleContainerTools/skaffold","slug":"error-converting-helm-artifactoverrides-during-ver","errorCode":null,"errorMessage":"error converting helm artifactOverrides during version upgrade: %w","messagePattern":"error converting helm artifactOverrides during version upgrade: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/schema/v2beta29/upgrade.go","lineNumber":202,"sourceCode":"\t\t\t\t\tsvts[k] = fmt.Sprintf(\"{{.IMAGE_FULLY_QUALIFIED_%s}}\", validV)\n\t\t\t\t}\n\t\t\t}\n\t\t\tnewPL.Render.Helm.Releases[i].SetValues = svs\n\t\t\tnewPL.Render.Helm.Releases[i].SetValueTemplates = svts\n\t\t}\n\n\t\t// Duplicate helm definitions between render and deployer.\n\t\t// This is required for backwards compatibility because skaffold v1 used helm namespace definitions for both\n\t\t// render (to populate {{.Release.Namespace}} templates) and deploy (as `--namespace` flag)\n\t\tnewPL.Deploy.LegacyHelmDeploy = &next.LegacyHelmDeploy{}\n\t\tnewPL.Deploy.LegacyHelmDeploy.LifecycleHooks = newHelm.LifecycleHooks\n\t\tnewPL.Deploy.LegacyHelmDeploy.Releases = newHelm.Releases\n\t\tnewPL.Deploy.LegacyHelmDeploy.Flags = newHelm.Flags\n\t}\n\n\terr := upgradeArtifactOverridesPatches(opu.oldPatchesMap, opu.newPatchesMap, oldPL)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error converting helm artifactOverrides during version upgrade: %w\", err)\n\t}\n\n\treturn nil\n}\n\nfunc upgradeArtifactOverridesPatches(oldsMap map[string][]JSONPatch, newsMap map[string][]next.JSONPatch, oldPL *Pipeline) error {\n\tfor k := range oldsMap {\n\t\tfor i, old := range oldsMap[k] {\n\t\t\tif artifactOverridesRegexp.Match([]byte(old.Path)) {\n\t\t\t\tidx, err := strconv.Atoi(strings.Split(old.Path, \"/\")[4])\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tnewPathModified := strings.ReplaceAll(strings.ReplaceAll(old.Path, \"/deploy/helm\", \"/manifests/helm\"),\n\t\t\t\t\t\"artifactOverrides\", \"setValueTemplates\")\n\t\t\t\tif oldPL.Deploy.HelmDeploy != nil {\n\t\t\t\t\tvalidV := pkgutil.SanitizeHelmTemplateValue(old.Value.Node.Value().(string))\n\t\t\t\t\tn := &util.YamlpatchNode{}","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/schema/v2beta29/upgrade.go#L184-L220","documentation":"During the v2beta29 upgrade, helm 'artifactOverrides' JSON patches stored on the old pipeline are converted to the new schema's patch representation via upgradeArtifactOverridesPatches. If that conversion fails (malformed patch, missing key in oldsMap/newsMap mapping), the error is wrapped with this message so users know the failure is specific to helm artifactOverrides migration.","triggerScenarios":"Calling the v2beta29 Upgrade() on a config where a deploy.helm (LegacyHelmDeploy) release or kustomize/helm JSON patch references artifactOverrides that cannot be converted — e.g. a patch path that no longer exists in the new schema.","commonSituations":"Configs using `deploy.helm.releases[].artifactOverrides` with hand-written JSON patches targeting nested helm values; upgrading across versions where the helm deploy struct fields were renamed.","solutions":["Inspect the wrapped cause and locate the helm release/patch with artifactOverrides in skaffold.yaml","Rewrite the artifactOverrides as the new schema's setValues/overrides form for that release","Simplify the patch to reference fields that exist in the target schema version"],"exampleFix":"# before\nreleases:\n  - name: myrel\n    artifactOverrides: {image: myimg}\n# after\nreleases:\n  - name: myrel\n    setValues:\n      image: myimg","handlingStrategy":"validation","validationCode":"for _, r := range cfg.Deploy.Helm.Releases {\n\tif r.ArtifactOverrides != nil {\n\t\tif !patchSchemaSupported(r.ArtifactOverrides) {\n\t\t\treturn fmt.Errorf(\"release %s has unsupported artifactOverrides\", r.Name)\n\t\t}\n\t}\n}","typeGuard":null,"tryCatchPattern":"if err := cfg.Upgrade(); err != nil {\n\tif strings.Contains(err.Error(), \"helm artifactOverrides\") {\n\t\t// migrate the release to setValues/overrides\n\t}\n}","preventionTips":["Prefer setValues/overrides over raw artifactOverrides JSON patches","Keep helm release patch paths in sync with current schema field names","Test upgrades on configs containing helm releases"],"tags":["helm","schema-upgrade","jsonpatch"],"backgroundTag":"helm-artifact-overrides-upgrade-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"}