{"record":{"id":"57c39f8bc5a369ae","repo":"apache/beam","slug":"artifact-v-not-found","errorCode":null,"errorMessage":"artifact %v not found","messagePattern":"artifact (.+?) not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/artifact/gcsproxy/retrieval.go","lineNumber":86,"sourceCode":"\t\tif _, _, err := gcsx.ParseObject(l.GetUri()); err != nil {\n\t\t\treturn nil, errors.Wrapf(err, \"location %v is not a GCS object\", l.GetUri())\n\t\t}\n\t\tblobs[l.GetName()] = l.GetUri()\n\t}\n\treturn &RetrievalServer{md: md.GetManifest(), blobs: blobs}, nil\n}\n\n// GetManifest returns the manifest for all artifacts.\nfunc (s *RetrievalServer) GetManifest(ctx context.Context, req *jobpb.GetManifestRequest) (*jobpb.GetManifestResponse, error) {\n\treturn &jobpb.GetManifestResponse{Manifest: s.md}, nil\n}\n\n// GetArtifact returns a given artifact.\nfunc (s *RetrievalServer) GetArtifact(req *jobpb.LegacyGetArtifactRequest, stream jobpb.LegacyArtifactRetrievalService_GetArtifactServer) error {\n\tkey := req.GetName()\n\tblob, ok := s.blobs[key]\n\tif !ok {\n\t\treturn errors.Errorf(\"artifact %v not found\", key)\n\t}\n\n\tbucket, object := parseObject(blob)\n\n\tctx := stream.Context()\n\tclient, err := gcsx.NewClient(ctx, storage.ScopeReadOnly)\n\tif err != nil {\n\t\treturn errors.Wrapf(err, \"Failed to create client for %v\", key)\n\t}\n\n\t// Stream artifact in up to 1MB chunks.\n\tr, err := client.Bucket(bucket).Object(object).NewReader(ctx)\n\tif err != nil {\n\t\treturn errors.Wrapf(err, \"Failed to read object for %v\", key)\n\t}\n\tdefer r.Close()\n\n\tdata := make([]byte, 1<<20)","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/artifact/gcsproxy/retrieval.go#L68-L104","documentation":"GetArtifact looks up the requested artifact name in the retrieval server's in-memory map of manifest locations. This error is returned when the key is not present, i.e. no artifact with that name exists in the loaded manifest.","triggerScenarios":"Calling GetArtifact (LegacyGetArtifact) with a name that does not match any ArtifactMetadata name in the manifest the server was built from.","commonSituations":"Client and server built from different manifest versions, name mismatch due to casing or path-like names, or stale manifests after re-staging the pipeline.","solutions":["Use artifact names exactly as they appear in the manifest (same casing, no extra path elements).","Regenerate or refresh the retrieval server's manifest so it matches the artifacts the client requests.","Log the available keys in s.blobs (manifest locations) to compare against the requested name."],"exampleFix":"// before (name invented client-side)\nreq.GetName() = \"artifact-0\"\n// after: use the name from the manifest\nname := artifact.Metadata.GetName() // matches manifest location name","handlingStrategy":"try-catch","validationCode":"// keep a client-side copy of the manifest names and check membership before requesting\nnames := map[string]bool{}\nfor _, l := range manifest.GetLocation() { names[l.GetName()] = true }\nif !names[want] { return fmt.Errorf(\"artifact %q not in manifest\", want) }","typeGuard":null,"tryCatchPattern":"err := streamArtifact(ctx, name)\nif err != nil && strings.Contains(err.Error(), \"not found\") { return fmt.Errorf(\"artifact %q missing from manifest; refresh manifest\", name) }","preventionTips":["Request artifacts by names taken directly from the manifest, not hardcoded strings.","Keep client and server manifests in sync (same source/version)."],"tags":["beam","lookup","artifact"],"backgroundTag":"resource-not-found","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"}