{"record":{"id":"4e0f699e73c2ec0d","repo":"apache/beam","slug":"no-location-for-v","errorCode":null,"errorMessage":"no location for %v","messagePattern":"no location for (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/artifact/gcsproxy/retrieval.go","lineNumber":143,"sourceCode":"\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 {\n\t\tpanic(err)\n\t}\n\treturn bucket, object\n}\n","sourceCodeStart":125,"sourceCodeEnd":156,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/artifact/gcsproxy/retrieval.go#L125-L156","documentation":"validate finishes by checking that every artifact listed in the manifest was claimed by some location; an artifact still marked fresh has no GCS location and could never be served, so this error is returned. Raised during NewRetrievalServer.","triggerScenarios":"md.GetManifest().GetArtifact() contains an artifact whose Name never appears in md.GetLocation(), so after the location loop its keys entry is still true.","commonSituations":"Location entries lost during manifest merge or truncation; artifact added after locations were computed; a bug in custom staging code that stages artifacts but never records their URIs.","solutions":["Ensure every staged artifact gets a Location entry (name + GCS URI) before CommitManifest.","Regenerate the manifest through the standard staging flow so locations are recorded automatically.","If an artifact genuinely has no blob, remove it from the manifest's artifact list.","Debug why locations were dropped: compare artifact names vs location names in the uploaded ProxyManifest object in GCS."],"exampleFix":"// before\nmd := &jobpb.ProxyManifest{Manifest: manifest} // no locations recorded\n// after\nmd := &jobpb.ProxyManifest{Manifest: manifest, Location: locs} // locs has one entry per artifact","handlingStrategy":"validation","validationCode":"func allArtifactsHaveLocations(md *jobpb.ProxyManifest) error {\n\tlocated := map[string]bool{}\n\tfor _, l := range md.GetLocation() {\n\t\tlocated[l.Name] = true\n\t}\n\tfor _, a := range md.GetManifest().GetArtifact() {\n\t\tif !located[a.Name] {\n\t\t\treturn fmt.Errorf(\"artifact %v has no location\", a.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 location for\") {\n\t\t// re-stage so every artifact gets a recorded GCS URI\n\t}\n}","preventionTips":["Record a Location for every artifact in the same staging pass that uploads it.","Never construct ProxyManifest without the Location field populated.","Inspect the committed manifest object in GCS when staging behavior seems off."],"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"}