{"record":{"id":"06aa048ab031ac06","repo":"GoogleContainerTools/skaffold","slug":"can-t-upgrade-to-s-build-acr-is-not-supported-an","errorCode":null,"errorMessage":"can't upgrade to %s, build.acr is not supported anymore, please remove it manually","messagePattern":"can't upgrade to (.+?), build\\.acr is not supported anymore, please remove it manually","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/schema/v1alpha5/upgrade.go","lineNumber":38,"sourceCode":"\t\"fmt\"\n\n\t\"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/schema/util\"\n\tnext \"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/schema/v1beta1\"\n\tpkgutil \"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/util\"\n)\n\n// Upgrade upgrades a configuration to the next version.\n// Config changes from v1alpha5 to v1beta1:\n// 1. Additions:\n//   - KanikoCache struct, KanikoBuild.Cache\n//   - BazelArtifact.BuildArgs\n// 2. Removals:\n//   - AzureContainerBuilder\n// 3. No updates\n\nfunc (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) {\n\tif c.Build.AzureContainerBuild != nil {\n\t\treturn nil, fmt.Errorf(\"can't upgrade to %s, build.acr is not supported anymore, please remove it manually\", next.Version)\n\t}\n\n\tfor _, profile := range c.Profiles {\n\t\tif profile.Build.AzureContainerBuild != nil {\n\t\t\treturn nil, fmt.Errorf(\"can't upgrade to %s, profiles.build.acr is not supported anymore, please remove it from the %s profile manually\", next.Version, profile.Name)\n\t\t}\n\t}\n\n\tvar newConfig next.SkaffoldConfig\n\n\tpkgutil.CloneThroughJSON(c, &newConfig)\n\tnewConfig.APIVersion = next.Version\n\n\treturn &newConfig, nil\n}\n","sourceCodeStart":20,"sourceCodeEnd":54,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/schema/v1alpha5/upgrade.go#L20-L54","documentation":"The v1alpha5→next Upgrade() refuses to run when the top-level build section uses the removed AzureContainerBuild (build.acr) builder, since there is no automatic migration target for it in the next version. Rather than silently dropping the builder, the upgrade aborts and tells the user to remove the field manually.","triggerScenarios":"Calling SkaffoldConfig.Upgrade() (or skaffold fix / upgrade path) on a config where c.Build.AzureContainerBuild != nil.","commonSituations":"skaffold.yaml files written when Azure Container builder (acr) was supported, being upgraded to a version where build.acr was deleted from the schema.","solutions":["Delete the build.acr block from skaffold.yaml and move ACR builds into build.artifacts entries with an explicit docker/jib builder, then re-run the upgrade","Use `skaffold fix` after manually removing the field","Check each profile too — profile-level build.acr triggers the sibling error"],"exampleFix":"# before\nbuild:\n  acr: {}\n# after\nbuild:\n  artifacts:\n    - image: myimg\n      docker: {}","handlingStrategy":"validation","validationCode":"if cfg.Build.AzureContainerBuild != nil {\n\treturn errors.New(\"remove build.acr before upgrading\")\n}","typeGuard":"func hasAzureBuild(b BuildConfig) bool { return b.AzureContainerBuild != nil }","tryCatchPattern":"if _, err := cfg.Upgrade(); err != nil {\n\tif strings.Contains(err.Error(), \"build.acr is not supported anymore\") {\n\t\t// prompt user to remove the field\n\t}\n}","preventionTips":["Search skaffold.yaml for 'acr:' before version upgrades","Migrate ACR usage to artifact-level builders proactively","Read schema release notes for removed fields"],"tags":["schema-upgrade","azure","config-migration"],"backgroundTag":"unsupported-builder-removed","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"}