{"record":{"id":"b959466bc8314d79","repo":"apache/beam","slug":"request-has-unexpected-artifact-type-s","errorCode":null,"errorMessage":"request has unexpected artifact type %s","messagePattern":"request has unexpected artifact type (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/runners/universal/runnerlib/stage.go","lineNumber":134,"sourceCode":"\t\t\t\t\tif err == io.EOF {\n\t\t\t\t\t\tcontinue // so we can get the real error from stream.Recv.\n\t\t\t\t\t}\n\t\t\t\t\treturn errors.Wrapf(err, \"failed to stage Go worker binary: %v\", binary)\n\t\t\t\t}\n\t\t\tcase graphx.URNArtifactFileType:\n\t\t\t\ttypePl := pipepb.ArtifactFilePayload{}\n\t\t\t\tif err := proto.Unmarshal(request.GetArtifact.Artifact.TypePayload, &typePl); err != nil {\n\t\t\t\t\treturn errors.Wrap(err, \"failed to parse artifact file payload\")\n\t\t\t\t}\n\t\t\t\tif err := stageFile(typePl.GetPath(), stream); err != nil {\n\t\t\t\t\tif err == io.EOF {\n\t\t\t\t\t\tcontinue // so we can get the real error from stream.Recv.\n\t\t\t\t\t}\n\t\t\t\t\treturn errors.Wrapf(err, \"failed to stage file %v\", typePl.GetPath())\n\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn errors.Errorf(\"request has unexpected artifact type %s\", typeUrn)\n\t\t\t}\n\n\t\tdefault:\n\t\t\treturn errors.Errorf(\"request has unexpected type %T\", request)\n\t\t}\n\t}\n}\n\nfunc stageFile(filename string, stream jobpb.ArtifactStagingService_ReverseArtifactRetrievalServiceClient) error {\n\tfd, err := os.Open(filename)\n\tif err != nil {\n\t\treturn errors.Wrapf(err, \"unable to open file %v\", filename)\n\t}\n\tdefer fd.Close()\n\n\tdata := make([]byte, 1<<20)\n\tfor {\n\t\tn, err := fd.Read(data)","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/universal/runnerlib/stage.go#L116-L152","documentation":"stageFiles returns this when the artifact request's type URN is not one of the supported values (Go worker binary URN or file type URN). It signals the artifact service sent an artifact type this SDK version does not know how to stage.","triggerScenarios":"The staging stream delivers an ArtifactRequest whose GetTypeUrn() matches neither graphx.URNArtifactGoWorker nor graphx.URNArtifactFileType, hitting the default case of the type-URN switch.","commonSituations":"Version skew: newer runner/job server introduces new artifact type URNs unknown to the older Go SDK; or a non-Go artifact set (e.g. Python or Java artifacts) is staged against a Go pipeline session.","solutions":["Upgrade the Beam Go SDK to a version supporting the new artifact type URN","Check the %s in the error to identify the unsupported URN","Ensure you are submitting a Go pipeline to this job server, not cross-language artifacts unsupported by staging","Report the URN to the Beam project if it appears to be a standard type the SDK should handle"],"exampleFix":"// before\ndefault:\n  return errors.Errorf(\"request has unexpected artifact type %s\", typeUrn)\n// after: upgrade SDK so the URN is recognized, e.g. go get github.com/apache/beam/sdks/v2@v2.xx.0","handlingStrategy":"type-guard","validationCode":"// verify supported URNs before staging\nallowed := map[string]bool{graphx.URNArtifactGoWorker: true, graphx.URNArtifactFileType: true}","typeGuard":"func isSupportedArtifactUrn(urn string) bool {\n  return urn == graphx.URNArtifactGoWorker || urn == graphx.URNArtifactFileType\n}","tryCatchPattern":"if err := submit(...); err != nil && strings.Contains(err.Error(), \"unexpected artifact type\") {\n  // upgrade SDK to support the URN printed in the error\n}","preventionTips":["Keep SDK current relative to the job server","Submit Go pipelines to Go-capable job servers","Log and inspect artifact URNs when onboarding new runners"],"tags":["artifact-staging","unsupported-artifact-type","version-skew","beam-runner"],"backgroundTag":"unsupported-enum-value","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"}