GoogleContainerTools/skaffold · error

can't upgrade to %s, profiles.build.acr is not supported any

Error message

can't upgrade to %s, profiles.build.acr is not supported anymore, please remove it from the %s profile manually

What it means

Same guard as the top-level build.acr error but applied per-profile: if any profile's Build.AzureContainerBuild is set, v1alpha5's Upgrade() aborts because profiles.build.acr cannot be auto-migrated. The profile's Name is included so the user knows exactly which profile to edit.

Source

Thrown at pkg/skaffold/schema/v1alpha5/upgrade.go:43

)

// Upgrade upgrades a configuration to the next version.
// Config changes from v1alpha5 to v1beta1:
// 1. Additions:
//   - KanikoCache struct, KanikoBuild.Cache
//   - BazelArtifact.BuildArgs
// 2. Removals:
//   - AzureContainerBuilder
// 3. No updates

func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) {
	if c.Build.AzureContainerBuild != nil {
		return nil, fmt.Errorf("can't upgrade to %s, build.acr is not supported anymore, please remove it manually", next.Version)
	}

	for _, profile := range c.Profiles {
		if profile.Build.AzureContainerBuild != nil {
			return 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)
		}
	}

	var newConfig next.SkaffoldConfig

	pkgutil.CloneThroughJSON(c, &newConfig)
	newConfig.APIVersion = next.Version

	return &newConfig, nil
}

View on GitHub (pinned to a1189de023)

Solutions

  1. Remove the acr block from the named profile's build section and re-run the upgrade
  2. Re-express ACR usage in that profile via artifact-level builders (docker with ACR registry) instead
  3. Run `skaffold fix` after manual removal

Example fix

# before
profiles:
  - name: prod
    build:
      acr: {...}
# after
profiles:
  - name: prod
    build:
      artifacts:
        - image: myimg
          docker: {}
Defensive patterns

Strategy: validation

Validate before calling

for _, p := range cfg.Profiles {
	if p.Build.AzureContainerBuild != nil {
		return fmt.Errorf("profile %s uses removed build.acr", p.Name)
	}
}

Type guard

func profileHasAzure(p Profile) bool { return p.Build != nil && p.Build.AzureContainerBuild != nil }

Try / catch

if _, err := cfg.Upgrade(); err != nil {
	if strings.Contains(err.Error(), "profiles.build.acr") {
		// extract profile name from message and patch it
	}
}

Prevention

When it happens

Trigger: Calling SkaffoldConfig.Upgrade() on a config where any c.Profiles[i].Build.AzureContainerBuild != nil.

Common situations: Older skaffold.yaml with profile-specific ACR overrides (e.g. a 'prod' profile using acr) being upgraded past the version where the Azure builder was removed.

Related errors


AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05). Data as JSON: /api/errors/d072bfa4445a9d19. Report an issue: GitHub.