{"record":{"id":"9f403b62b5a6d245","repo":"apache/beam","slug":"invalid-manifest-location","errorCode":null,"errorMessage":"invalid manifest location","messagePattern":"invalid manifest location","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/artifact/gcsproxy/staging.go","lineNumber":54,"sourceCode":"// (GCS). It commits a single manifest and ignores the staging id.\ntype StagingServer struct {\n\tmanifest     string\n\tbucket, root string\n\tblobs        map[string]staged // guarded by mu\n\tmu           sync.Mutex\n}\n\ntype staged struct {\n\tobject, hash string\n}\n\n// NewStagingServer creates a artifact staging server for the given manifest.\n// It requires that the manifest is in GCS and will stage the supplied\n// artifacts next to it.\nfunc NewStagingServer(manifest string) (*StagingServer, error) {\n\tbucket, object, err := gcsx.ParseObject(manifest)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"invalid manifest location\")\n\t}\n\troot := path.Join(path.Dir(object), \"blobs\")\n\n\treturn &StagingServer{\n\t\tmanifest: object,\n\t\tbucket:   bucket,\n\t\troot:     root,\n\t\tblobs:    make(map[string]staged),\n\t}, nil\n}\n\n// CommitManifest commits the given artifact manifest to GCS.\nfunc (s *StagingServer) CommitManifest(ctx context.Context, req *jobpb.CommitManifestRequest) (*jobpb.CommitManifestResponse, error) {\n\tmanifest := req.GetManifest()\n\n\ts.mu.Lock()\n\tloc, err := matchLocations(manifest.GetArtifact(), s.blobs)\n\tif err != nil {","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/artifact/gcsproxy/staging.go#L36-L72","documentation":"NewStagingServer expects the manifest path to be a valid GCS object specifier (bucket/object). gcsx.ParseObject failing — wrong scheme, missing bucket, malformed path — causes this wrapped error. The staging server only supports manifests stored in GCS.","triggerScenarios":"Calling NewStagingServer(manifest) with a path that isn't of the form gs://bucket/path/to/object (e.g. a local path, a bare bucket name, or an unsupported scheme).","commonSituations":"Passing a local filesystem path where a GCS path is required; forgetting the gs:// prefix; using an s3:// or other cloud path; empty string from an unset pipeline option.","solutions":["Pass a full GCS object path like gs://my-bucket/staging/manifest.json.","Check the pipeline option supplying the staging location is set and correctly prefixed with gs://.","Verify the path has both a bucket and a non-empty object path (parseObject requires '/').","Use path.Join on the object portion if building the path programmatically."],"exampleFix":"// before\nserver, err := gcsproxy.NewStagingServer(\"/tmp/staging/manifest.json\")\n// after\nserver, err := gcsproxy.NewStagingServer(\"gs://my-bucket/staging/manifest.json\")","handlingStrategy":"validation","validationCode":"func validGCSObjectPath(p string) bool {\n\tu, err := url.Parse(p)\n\treturn err == nil && u.Scheme == \"gs\" && u.Host != \"\" && strings.TrimPrefix(u.Path, \"/\") != \"\"\n}\n// call before NewStagingServer","typeGuard":null,"tryCatchPattern":"srv, err := gcsproxy.NewStagingServer(manifestPath)\nif err != nil {\n\tif strings.Contains(err.Error(), \"invalid manifest location\") {\n\t\treturn fmt.Errorf(\"--staging_location must be a gs://bucket/object path: %w\", err)\n\t}\n}","preventionTips":["Always pass gs://bucket/path/object form for the manifest location.","Validate staging pipeline options at flag-parse time.","Don't substitute local or non-GCS cloud paths — only GCS is supported."],"tags":["gcs","config","validation","url"],"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"}