{"record":{"id":"2bb4d68a4150c10d","repo":"apache/beam","slug":"no-artifact-named-v-for-location-v","errorCode":null,"errorMessage":"no artifact named %v for location %v","messagePattern":"no artifact named (.+?) for location (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/artifact/gcsproxy/retrieval.go","lineNumber":133,"sourceCode":"\t\tif err != nil {\n\t\t\treturn errors.Wrapf(err, \"failed to read from %v\", blob)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc validate(md *jobpb.ProxyManifest) error {\n\tkeys := make(map[string]bool)\n\tfor _, a := range md.GetManifest().GetArtifact() {\n\t\tif _, seen := keys[a.Name]; seen {\n\t\t\treturn errors.Errorf(\"multiple artifact with name %v\", a.Name)\n\t\t}\n\t\tkeys[a.Name] = true\n\t}\n\tfor _, l := range md.GetLocation() {\n\t\tfresh, seen := keys[l.Name]\n\t\tif !seen {\n\t\t\treturn errors.Errorf(\"no artifact named %v for location %v\", l.Name, l.Uri)\n\t\t}\n\t\tif !fresh {\n\t\t\treturn errors.Errorf(\"multiple locations for %v:%v\", l.Name, l.Uri)\n\t\t}\n\t\tkeys[l.Name] = false\n\t}\n\n\tfor key, fresh := range keys {\n\t\tif fresh {\n\t\t\treturn errors.Errorf(\"no location for %v\", key)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc parseObject(blob string) (string, string) {\n\tbucket, object, err := gcsx.ParseObject(blob)\n\tif err != nil {","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/artifact/gcsproxy/retrieval.go#L115-L151","documentation":"validate requires every Location entry in the ProxyManifest to reference an artifact Name present in the manifest's artifact list. This error means a location points at an artifact name that doesn't exist, so retrieval could never resolve it.","triggerScenarios":"NewRetrievalServer receives a ProxyManifest where md.GetLocation() contains an entry whose Name is absent from md.GetManifest().GetArtifact().","commonSituations":"Manifest artifact list and location list were built independently and drifted out of sync; artifact entries dropped by an upstream filter while locations were kept; hand-edited manifest JSON with a renamed artifact.","solutions":["Ensure every location Name has a matching entry in Manifest.Artifact before committing the manifest.","Regenerate the manifest through CommitManifest so artifacts and locations are built together.","Validate the manifest with the same uniqueness/consistency checks before uploading it.","If hand-editing, rename in both the artifact entry and its location entry."],"exampleFix":"// before\nloc := &jobpb.Location{Name: \"worker.jar\", Uri: \"gs://bucket/blobs/xyz\"}\n// after: add the matching artifact first\nmanifest.Artifact = append(manifest.Artifact, &pipepb.Artifact{Name: \"worker.jar\"})\nloc := &jobpb.Location{Name: \"worker.jar\", Uri: \"gs://bucket/blobs/xyz\"}","handlingStrategy":"validation","validationCode":"func locationsReferenceArtifacts(md *jobpb.ProxyManifest) error {\n\tnames := map[string]bool{}\n\tfor _, a := range md.GetManifest().GetArtifact() {\n\t\tnames[a.Name] = true\n\t}\n\tfor _, l := range md.GetLocation() {\n\t\tif !names[l.Name] {\n\t\t\treturn fmt.Errorf(\"location %v has no artifact\", l.Name)\n\t\t}\n\t}\n\treturn nil\n}","typeGuard":null,"tryCatchPattern":"if err := gcsproxy.NewRetrievalServer(manifestPath); err != nil {\n\tif strings.Contains(err.Error(), \"no artifact named\") {\n\t\t// regenerate the manifest so artifacts and locations stay in sync\n\t}\n}","preventionTips":["Generate artifact entries and location entries from the same staging loop.","Never filter artifacts from a manifest without filtering locations too.","Run validate()-style checks before committing any manifest."],"tags":["validation","manifest","protobuf"],"backgroundTag":"schema-validation-failed","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}