GoogleContainerTools/skaffold · error
duplicate release name %s
Error message
duplicate release name %s
What it means
When building the Helm release dependency graph, skaffold validates that every release name in the deploy config is unique. If two releases share the same name, `NewDependencyGraph` returns `duplicate release name %s` because the graph cannot distinguish them.
Source
Thrown at pkg/skaffold/deploy/helm/dependencygraph.go:39
"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/schema/latest"
)
// DependencyGraph represents a graph of helm release dependencies
type DependencyGraph struct {
graph map[string][]string
releases []latest.HelmRelease
hasDependencies bool
}
// NewDependencyGraph creates a new DependencyGraph from a list of helm releases
func NewDependencyGraph(releases []latest.HelmRelease) (*DependencyGraph, error) {
graph := make(map[string][]string)
releaseNames := make(map[string]bool)
for _, r := range releases {
if _, exists := releaseNames[r.Name]; exists {
return nil, fmt.Errorf("duplicate release name %s", r.Name)
}
releaseNames[r.Name] = true
}
// Check for non-existent dependencies
hasDependencies := false
for _, r := range releases {
for _, dep := range r.DependsOn {
if !releaseNames[dep] {
return nil, fmt.Errorf("release %s depends on non-existent release %s", r.Name, dep)
}
hasDependencies = true
}
graph[r.Name] = r.DependsOn
}
g := &DependencyGraph{
graph: graph,View on GitHub (pinned to a1189de023)
Solutions
- Rename one of the duplicate releases in skaffold.yaml so each `releases[].name` is unique
- If the same chart should be installed twice, give each install a distinct release name (e.g. append a suffix)
- Validate the config before deploy: `skaffold config` / schema check or run `skaffold diagnose`
Example fix
// before
releases:
- name: myapp
chartPath: charts/app
- name: myapp
chartPath: charts/app-v2
// after
releases:
- name: myapp
chartPath: charts/app
- name: myapp-v2
chartPath: charts/app-v2 Defensive patterns
Strategy: validation
Validate before calling
seen := map[string]bool{}
for _, r := range cfg.Deploy.Helm.Releases {
if seen[r.Name] {
return fmt.Errorf("duplicate release name %s", r.Name)
}
seen[r.Name] = true
}
Prevention
- Enforce unique release names when templating/generating skaffold.yaml
- Run schema validation or `skaffold diagnose` before deploys
- Code-review helm release blocks added to config for copy-paste duplicates
When it happens
Trigger: skaffold.yaml `deploy.helm.releases` contains two entries with the same `name` field; NewDependencyGraph is called during helm Deploy and by setHelmDefaults.
Common situations: Copy-paste of a release block in skaffold.yaml with the name left unchanged; generated/templated config producing repeated release names.
Related errors
- release %s depends on non-existent release %s
- unable to create dependency graph: %w
- cycle detected involving release %q
- unable to get releases by level: %w
- unable to expand %q: %w
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/b9805143d8f05689.
Report an issue: GitHub.