{"record":{"id":"beaa5b48e1b9abf0","repo":"apache/beam","slug":"computefacts-unable-to-check-q-side-inputs","errorCode":null,"errorMessage":"computeFacts: unable to check %q side inputs","messagePattern":"computeFacts: unable to check %q side inputs","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/runners/prism/internal/preprocess.go","lineNumber":383,"sourceCode":"\t\tPcolConsumers:        map[string][]link{},\n\t\tUsedAsSideInput:      map[string]bool{},\n\t\tDirectSideInputs:     map[string]map[string]bool{}, // direct set\n\t\tDownstreamSideInputs: map[string]map[string]bool{}, // transitive set\n\t}\n\n\t// Use the topological ids so each PCollection only has a single\n\t// producer. We've already pruned out composites at this stage.\n\tfor _, tID := range topological {\n\t\tt := comps.GetTransforms()[tID]\n\t\tfor local, global := range t.GetOutputs() {\n\t\t\tif p, ok := ret.PcolProducers[global]; ok {\n\t\t\t\treturn nil, fmt.Errorf(\"computeFacts: two producers for one PCollection: %v and %v\", p, link{Transform: tID, Local: local, Global: global})\n\t\t\t}\n\t\t\tret.PcolProducers[global] = link{Transform: tID, Local: local, Global: global}\n\t\t}\n\t\tsis, err := getSideInputs(t)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"computeFacts: unable to check %q side inputs\", tID)\n\t\t}\n\t\tdirectSIs := map[string]bool{}\n\t\tret.DirectSideInputs[tID] = directSIs\n\t\tfor local, global := range t.GetInputs() {\n\t\t\tret.PcolConsumers[global] = append(ret.PcolConsumers[global], link{Transform: tID, Local: local, Global: global})\n\t\t\tif _, ok := sis[local]; ok {\n\t\t\t\tret.UsedAsSideInput[global] = true\n\t\t\t\tdirectSIs[global] = true\n\t\t\t}\n\t\t}\n\t}\n\n\tfor _, tID := range topological {\n\t\tcomputeDownstreamSideInputs(tID, comps, ret)\n\t}\n\n\treturn ret, nil\n}","sourceCodeStart":365,"sourceCodeEnd":401,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/prism/internal/preprocess.go#L365-L401","documentation":"computeFacts builds a fact sheet about a pipeline stage for the prism runner, and wraps any failure from getSideInputs(t) with the transform ID that could not be inspected. It indicates the transform's payload (a ParDoPayload) could not be unmarshaled while determining its side inputs, so prism cannot safely plan the stage.","triggerScenarios":"A ParDo (or similar URN like ProcessSizedElements) transform in the submitted pipeline has a spec payload that fails proto unmarshaling — e.g. a corrupted or malformed ParDoPayload, or an unexpected serialization produced by a different Beam SDK version.","commonSituations":"Submitting a pipeline from an SDK whose Beam pipeline proto payload encoding is newer/incompatible with the prism runner version; hand-crafted or truncated pipeline protos in tests.","solutions":["Upgrade the Beam Go SDK and runner to matching versions so ParDoPayload proto definitions align","Validate the pipeline payload round-trips through proto unmarshal before submitting to prism","Log t.GetSpec().GetPayload() bytes and check for corruption or wrong URN/payload pairing"],"exampleFix":"// before (opaque wrap)\nreturn nil, fmt.Errorf(\"computeFacts: unable to check %q side inputs\", tID)\n// after (include the cause)\nreturn nil, fmt.Errorf(\"computeFacts: unable to check %q side inputs: %w\", tID, err)","handlingStrategy":"validation","validationCode":"pardo := &pipepb.ParDoPayload{}\nif err := (proto.UnmarshalOptions{}).Unmarshal(t.GetSpec().GetPayload(), pardo); err != nil {\n    return fmt.Errorf(\"invalid ParDoPayload for %v: %w\", tID, err)\n}","typeGuard":null,"tryCatchPattern":"if _, err := computeFacts(p); err != nil {\n    var pe *preprocessError\n    if errors.As(err, &pe) { /* inspect transform ID */ }\n}","preventionTips":["Keep SDK and prism runner versions identical","Validate pipeline protos before submission in CI","Never reuse cached/corrupted serialized pipelines"],"tags":["go","beam","protobuf","runner"],"backgroundTag":"protobuf-unmarshal-failed","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}