apache/beam · error
computeFacts: unable to check %q side inputs
Error message
computeFacts: unable to check %q side inputs
What it means
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.
Source
Thrown at sdks/go/pkg/beam/runners/prism/internal/preprocess.go:383
PcolConsumers: map[string][]link{},
UsedAsSideInput: map[string]bool{},
DirectSideInputs: map[string]map[string]bool{}, // direct set
DownstreamSideInputs: map[string]map[string]bool{}, // transitive set
}
// Use the topological ids so each PCollection only has a single
// producer. We've already pruned out composites at this stage.
for _, tID := range topological {
t := comps.GetTransforms()[tID]
for local, global := range t.GetOutputs() {
if p, ok := ret.PcolProducers[global]; ok {
return nil, fmt.Errorf("computeFacts: two producers for one PCollection: %v and %v", p, link{Transform: tID, Local: local, Global: global})
}
ret.PcolProducers[global] = link{Transform: tID, Local: local, Global: global}
}
sis, err := getSideInputs(t)
if err != nil {
return nil, fmt.Errorf("computeFacts: unable to check %q side inputs", tID)
}
directSIs := map[string]bool{}
ret.DirectSideInputs[tID] = directSIs
for local, global := range t.GetInputs() {
ret.PcolConsumers[global] = append(ret.PcolConsumers[global], link{Transform: tID, Local: local, Global: global})
if _, ok := sis[local]; ok {
ret.UsedAsSideInput[global] = true
directSIs[global] = true
}
}
}
for _, tID := range topological {
computeDownstreamSideInputs(tID, comps, ret)
}
return ret, nil
}View on GitHub (pinned to 12126d8942)
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
Example fix
// before (opaque wrap)
return nil, fmt.Errorf("computeFacts: unable to check %q side inputs", tID)
// after (include the cause)
return nil, fmt.Errorf("computeFacts: unable to check %q side inputs: %w", tID, err) Defensive patterns
Strategy: validation
Validate before calling
pardo := &pipepb.ParDoPayload{}
if err := (proto.UnmarshalOptions{}).Unmarshal(t.GetSpec().GetPayload(), pardo); err != nil {
return fmt.Errorf("invalid ParDoPayload for %v: %w", tID, err)
} Try / catch
if _, err := computeFacts(p); err != nil {
var pe *preprocessError
if errors.As(err, &pe) { /* inspect transform ID */ }
} Prevention
- Keep SDK and prism runner versions identical
- Validate pipeline protos before submission in CI
- Never reuse cached/corrupted serialized pipelines
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "cannot parse invalid wire-format data", "cannot unmarshal", "failed unmarshalling": protobuf unmarshal errors explained — this error's family across 10 libraries.
Related errors
- can't get data to render
- retrieveCoders: couldn't handle component %d %q of %q %v: %w
- prism error building stage %v - decoding TestStreamPayload:
- unable to unmarshal ParDoPayload for %v - %q: %w
- unable to decode ParDoPayload for %v
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/beaa5b48e1b9abf0.
Report an issue: GitHub.