apache/beam · error
multiple artifact with name
Error message
multiple artifact with name %v
What it means
validate rejects a ProxyManifest whose artifact list contains two entries with the same Name, since artifact names must be unique keys for retrieval lookup. The error is raised at server construction (NewRetrievalServer), before serving any requests.
Solutions
- Deduplicate artifacts by Name before building/committing the ProxyManifest.
- Regenerate the manifest via the standard staging path (CommitManifest) instead of hand-crafting it.
- If merging manifests, key artifacts by Name in a map so later entries overwrite earlier ones.
- Check the staging server code for repeated calls to AddArtifacts-like APIs for the same file.
Example fix
// before
artifacts := append(manifest.GetArtifact(), art)
// after
seen := map[string]bool{}
var artifacts []*pipepb.Artifact
for _, a := append(manifest.GetArtifact(), art) {
if !seen[a.Name] {
seen[a.Name] = true
artifacts = append(artifacts, a)
}
} Defensive patterns
Strategy: validation
Validate before calling
func artifactNamesUnique(md *jobpb.ProxyManifest) error {
seen := map[string]bool{}
for _, a := range md.GetManifest().GetArtifact() {
if seen[a.Name] {
return fmt.Errorf("duplicate artifact %v", a.Name)
}
seen[a.Name] = true
}
return nil
} Try / catch
if err := gcsproxy.NewRetrievalServer(manifestPath); err != nil {
if strings.Contains(err.Error(), "multiple artifact with name") {
// rebuild/deduplicate the manifest and re-upload
}
} Prevention
- Deduplicate artifacts by Name whenever assembling or merging manifests.
- Always build manifests through CommitManifest rather than by hand.
- Add a validate() call before uploading any ProxyManifest.
When it happens
Trigger: NewRetrievalServer is called with a manifest md where md.GetManifest().GetArtifact() contains two or more artifacts sharing the same Name field.
Common situations: A buggy staging pipeline appends the same artifact twice to the Manifest proto; manual assembly of ProxyManifest JSON/proto duplicates entries; merge of two manifests without deduplicating artifact names.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- multiple locations for
- no artifact named for location
- no location for
- failed to marshal proxy manifest
- Given message schema
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/39652df4ba0be046.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/go/pkg/beam/artifact/gcsproxy/retrieval.go:126
if err := stream.Send(&jobpb.ArtifactChunk{Data: data[:n]}); err != nil {
return errors.Wrap(err, "chunk send failed")
}
}
if err == io.EOF {
break
}
if err != nil {
return errors.Wrapf(err, "failed to read from %v", blob)
}
}
return nil
}
func validate(md *jobpb.ProxyManifest) error {
keys := make(map[string]bool)
for _, a := range md.GetManifest().GetArtifact() {
if _, seen := keys[a.Name]; seen {
return errors.Errorf("multiple artifact with name %v", a.Name)
}
keys[a.Name] = true
}
for _, l := range md.GetLocation() {
fresh, seen := keys[l.Name]
if !seen {
return errors.Errorf("no artifact named %v for location %v", l.Name, l.Uri)
}
if !fresh {
return errors.Errorf("multiple locations for %v:%v", l.Name, l.Uri)
}
keys[l.Name] = false
}
for key, fresh := range keys {
if fresh {
return errors.Errorf("no location for %v", key)
}View on GitHub (pinned to 12126d8942)