{"record":{"id":"b9805143d8f05689","repo":"GoogleContainerTools/skaffold","slug":"duplicate-release-name-s","errorCode":null,"errorMessage":"duplicate release name %s","messagePattern":"duplicate release name (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/deploy/helm/dependencygraph.go","lineNumber":39,"sourceCode":"\n\t\"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/schema/latest\"\n)\n\n// DependencyGraph represents a graph of helm release dependencies\ntype DependencyGraph struct {\n\tgraph           map[string][]string\n\treleases        []latest.HelmRelease\n\thasDependencies bool\n}\n\n// NewDependencyGraph creates a new DependencyGraph from a list of helm releases\nfunc NewDependencyGraph(releases []latest.HelmRelease) (*DependencyGraph, error) {\n\tgraph := make(map[string][]string)\n\treleaseNames := make(map[string]bool)\n\n\tfor _, r := range releases {\n\t\tif _, exists := releaseNames[r.Name]; exists {\n\t\t\treturn nil, fmt.Errorf(\"duplicate release name %s\", r.Name)\n\t\t}\n\t\treleaseNames[r.Name] = true\n\t}\n\n\t// Check for non-existent dependencies\n\thasDependencies := false\n\tfor _, r := range releases {\n\t\tfor _, dep := range r.DependsOn {\n\t\t\tif !releaseNames[dep] {\n\t\t\t\treturn nil, fmt.Errorf(\"release %s depends on non-existent release %s\", r.Name, dep)\n\t\t\t}\n\t\t\thasDependencies = true\n\t\t}\n\t\tgraph[r.Name] = r.DependsOn\n\t}\n\n\tg := &DependencyGraph{\n\t\tgraph:           graph,","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/deploy/helm/dependencygraph.go#L21-L57","documentation":"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.","triggerScenarios":"skaffold.yaml `deploy.helm.releases` contains two entries with the same `name` field; NewDependencyGraph is called during helm Deploy and by setHelmDefaults.","commonSituations":"Copy-paste of a release block in skaffold.yaml with the name left unchanged; generated/templated config producing repeated release names.","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`"],"exampleFix":"// before\nreleases:\n  - name: myapp\n    chartPath: charts/app\n  - name: myapp\n    chartPath: charts/app-v2\n\n// after\nreleases:\n  - name: myapp\n    chartPath: charts/app\n  - name: myapp-v2\n    chartPath: charts/app-v2","handlingStrategy":"validation","validationCode":"seen := map[string]bool{}\nfor _, r := range cfg.Deploy.Helm.Releases {\n    if seen[r.Name] {\n        return fmt.Errorf(\"duplicate release name %s\", r.Name)\n    }\n    seen[r.Name] = true\n}\n","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["helm","config","dependency-graph"],"backgroundTag":"duplicate-release-name","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"}