{"record":{"id":"0fdd2e84f59b990a","repo":"apache/beam","slug":"invalid-manifest-object-v","errorCode":null,"errorMessage":"invalid manifest object %v","messagePattern":"invalid manifest object (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/artifact/gcsproxy/retrieval.go","lineNumber":41,"sourceCode":"\tjobpb \"github.com/apache/beam/sdks/v2/go/pkg/beam/model/jobmanagement_v1\"\n\t\"github.com/apache/beam/sdks/v2/go/pkg/beam/util/gcsx\"\n\t\"golang.org/x/net/context\"\n\t\"google.golang.org/protobuf/proto\"\n)\n\n// RetrievalServer is a artifact retrieval server backed by Google\n// Cloud Storage (GCS). It serves a single manifest and ignores\n// the worker id. The server performs no caching or pre-fetching.\ntype RetrievalServer struct {\n\tmd    *jobpb.Manifest\n\tblobs map[string]string\n}\n\n// ReadProxyManifest reads and parses the proxy manifest from GCS.\nfunc ReadProxyManifest(ctx context.Context, object string) (*jobpb.ProxyManifest, error) {\n\tbucket, obj, err := gcsx.ParseObject(object)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"invalid manifest object %v\", object)\n\t}\n\n\tcl, err := gcsx.NewClient(ctx, storage.ScopeReadOnly)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"failed to create GCS client\")\n\t}\n\tcontent, err := gcsx.ReadObject(ctx, cl, bucket, obj)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"failed to read manifest %v\", object)\n\t}\n\tvar md jobpb.ProxyManifest\n\tif err := proto.Unmarshal(content, &md); err != nil {\n\t\treturn nil, errors.Wrapf(err, \"invalid manifest %v\", object)\n\t}\n\treturn &md, nil\n}\n\n// NewRetrievalServer creates a artifact retrieval server for the","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/artifact/gcsproxy/retrieval.go#L23-L59","documentation":"ReadProxyManifest parses a GCS proxy manifest object path before reading it. This wrapped error is returned when gcsx.ParseObject cannot interpret the object string as a valid GCS object reference (bucket/object), so the manifest location itself is malformed.","triggerScenarios":"Calling ReadProxyManifest(ctx, object) with a string that is not of the form gs://bucket/path, e.g. an empty string, a bare bucket name, or an https URL.","commonSituations":"Constructing the manifest path by hand, missing the gs:// scheme, or accidentally passing the manifest contents/URL instead of the GCS object path.","solutions":["Pass the full GCS object path in gs://bucket/object form, e.g. gs://my-bucket/artifacts/manifest.","Verify no surrounding whitespace or truncation of the path in your config/env.","Use gcsx.ParseObject yourself first to validate the string and surface a clearer failure."],"exampleFix":"// before\nReadProxyManifest(ctx, \"my-bucket/artifacts/manifest\")\n// after\nReadProxyManifest(ctx, \"gs://my-bucket/artifacts/manifest\")","handlingStrategy":"validation","validationCode":"func isGCSPath(s string) bool { _, _, err := gcsx.ParseObject(s); return err == nil }\nif !isGCSPath(manifestObj) { return fmt.Errorf(\"manifest must be gs://bucket/object, got %q\", manifestObj) }","typeGuard":"func isGCSObject(s string) bool { return strings.HasPrefix(s, \"gs://\") && strings.Count(strings.TrimPrefix(s, \"gs://\"), \"/\") >= 1 }","tryCatchPattern":"md, err := ReadProxyManifest(ctx, obj); if err != nil { if strings.Contains(err.Error(), \"invalid manifest object\") { /* fix path format */ } ; return err }","preventionTips":["Build manifest paths with a helper that always emits gs://bucket/object.","Trim whitespace and log the exact string passed to ReadProxyManifest."],"tags":["gcs","url","beam","go"],"backgroundTag":"invalid-url-format","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"}