{"record":{"id":"91c964e3d49f0163","repo":"apache/beam","slug":"builddescriptor-couldn-t-retrieve-coder-q-for-internal","errorCode":null,"errorMessage":"buildDescriptor: couldn't retrieve coder %q for internal pcollection %q: %w","messagePattern":"buildDescriptor: couldn't retrieve coder %q for internal pcollection %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/runners/prism/internal/stage.go","lineNumber":647,"sourceCode":"\n\tinputInfo := engine.PColInfo{\n\t\tGlobalID:    stg.primaryInput,\n\t\tWindowCoder: winCoder,\n\t\tWDec:        wDec,\n\t\tWEnc:        wEnc,\n\t\tEDec:        ed,\n\t\tKeyDec:      kd,\n\t}\n\n\tstg.inputTransformID = stg.ID + \"_source\"\n\ttransforms[stg.inputTransformID] = sourceTransform(stg.inputTransformID, portFor(wInCid, wk), stg.primaryInput)\n\n\t// Update coders for internal collections, and add those collections to the bundle descriptor.\n\tfor _, pid := range stg.internalCols {\n\t\tcol := clonePColToBundle(pid)\n\t\t// Keep the original coder of an internal pcollection without rewriting(LP'ing).\n\t\tif err := retrieveCoders(col.GetCoderId(), coders, comps.GetCoders()); err != nil {\n\t\t\treturn fmt.Errorf(\"buildDescriptor: couldn't retrieve coder %q for internal pcollection %q: %w\", col.GetCoderId(), pid, err)\n\t\t}\n\t}\n\t// Add coders for all windowing strategies.\n\t// TODO: filter PCollections, filter windowing strategies by Pcollections instead.\n\tfor _, ws := range comps.GetWindowingStrategies() {\n\t\tlpUnknownCoders(ws.GetWindowCoderId(), coders, comps.GetCoders())\n\t}\n\n\treconcileCoders(coders, comps.GetCoders())\n\n\tvar timerServiceDescriptor *pipepb.ApiServiceDescriptor\n\tif len(stg.hasTimers) > 0 {\n\t\ttimerServiceDescriptor = &pipepb.ApiServiceDescriptor{\n\t\t\tUrl: wk.Endpoint(),\n\t\t}\n\t}\n\n\tdesc := &fnpb.ProcessBundleDescriptor{","sourceCodeStart":629,"sourceCodeEnd":665,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/prism/internal/stage.go#L629-L665","documentation":"Internal (stage-produced, stage-consumed) PCollections must have their coders retrievable via retrieveCoders so the bundle descriptor carries complete coder definitions. If retrieval fails — the coder graph is incomplete — prism cannot construct the bundle and returns this error naming the coder ID and internal PCollection.","triggerScenarios":"retrieveCoders(col.GetCoderId(), coders, comps.GetCoders()) errors while iterating stg.internalCols in buildDescriptor.","commonSituations":"Fused stages whose intermediate PCollections reference partial or unknown coders; optimized graphs where coder components were dropped; version-skewed pipeline protos.","solutions":["Check the wrapped error for which component coder is missing","Validate the pipeline's coder component graph before submission","Rebuild the pipeline with a supported SDK version","Reduce fusion/optimization by restructuring the pipeline to isolate the collection"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"for _, pid := range internalCols {\n    if _, ok := comps.GetCoders()[pcols[pid].GetCoderId()]; !ok {\n        return fmt.Errorf(\"internal pcol %q coder missing\", pid)\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep fusion-friendly pipelines with complete coder components","Update runner when changing SDK versions","Validate the graph with a reference runner"],"tags":["beam","prism","coder","internal"],"backgroundTag":"resource-not-found","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"}