{"record":{"id":"eb5f8a49abf42847","repo":"apache/beam","slug":"makewindowcoders-unknown-urn-v","errorCode":null,"errorMessage":"makeWindowCoders, unknown urn: %v","messagePattern":"makeWindowCoders, unknown urn: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/runners/prism/internal/coders.go","lineNumber":126,"sourceCode":"\treturn wvcID, nil\n}\n\n// makeWindowCoders categorizes and provides the encoder, decoder pair for the type of window.\nfunc makeWindowCoders(wc *pipepb.Coder) (engine.WinCoderType, exec.WindowDecoder, exec.WindowEncoder) {\n\tvar cwc *coder.WindowCoder\n\tvar winCoder engine.WinCoderType\n\tswitch wc.GetSpec().GetUrn() {\n\tcase urns.CoderGlobalWindow:\n\t\twinCoder = engine.WinGlobal\n\t\tcwc = coder.NewGlobalWindow()\n\tcase urns.CoderIntervalWindow:\n\t\twinCoder = engine.WinInterval\n\t\tcwc = coder.NewIntervalWindow()\n\tdefault:\n\t\t// TODO(https://github.com/apache/beam/issues/31921): Support custom windowfns instead of panicking here.\n\t\twinCoder = engine.WinCustom\n\t\tslog.LogAttrs(context.TODO(), slog.LevelError, \"makeWindowCoders: unknown urn\", slog.String(\"urn\", wc.GetSpec().GetUrn()))\n\t\tpanic(fmt.Sprintf(\"makeWindowCoders, unknown urn: %v\", prototext.Format(wc)))\n\t}\n\treturn winCoder, exec.MakeWindowDecoder(cwc), exec.MakeWindowEncoder(cwc)\n}\n\n// lpUnknownCoders takes a coder, and populates coders with any new coders\n// coders that the runner needs to be safe, and speedy.\n// It returns either the passed in coder id, or the new safe coder id.\nfunc lpUnknownCoders(cID string, bundle, base map[string]*pipepb.Coder) (string, error) {\n\t// First check if we've already added the LP version of this coder to coders already.\n\tlpcID := cID + \"_lp\"\n\t// Check if we've done this one before.\n\tif _, ok := bundle[lpcID]; ok {\n\t\treturn lpcID, nil\n\t}\n\t// All coders in the coders map have been processed.\n\tif _, ok := bundle[cID]; ok {\n\t\treturn cID, nil\n\t}","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/prism/internal/coders.go#L108-L144","documentation":"prism's makeWindowCoders maps the pipeline's window coder URN to an engine window coder. It supports fixed, global, and interval windows; any other URN (e.g. custom windowing) hits the default case, logs an error, and panics because custom window functions are not yet supported by the runner.","triggerScenarios":"Submitting a pipeline to the prism runner whose GBK/window value coder uses a windowing URN other than the built-in ones, e.g. beam:coder:window:v1 payload specifying a custom WindowFn.","commonSituations":"Using custom WindowFn implementations (user code) with prism, or pipeline graphs produced by other SDKs with non-standard window coders.","solutions":["Use a supported built-in windowing (Fixed, Sliding, Global, Sessions where mapped) instead of a custom WindowFn","Check the logged urn in the error to identify which window coder is unsupported","Rewrite the pipeline to avoid custom windowing when targeting prism","Implement/extend support in prism's coders.go if you control the runner build (see TODO for issue 31921)"],"exampleFix":"// before\npcf := beam.WindowInto(s, window.NewCustomWindowFn(myFn), col)\n// after\npcf := beam.WindowInto(s, window.NewFixedWindows(time.Minute), col)","handlingStrategy":"validation","validationCode":"if !isBuiltInWindowFn(pipeline) {\n    return errors.New(\"prism does not support custom window fns; use Fixed/Sliding/Global windows\")\n}","typeGuard":null,"tryCatchPattern":"defer func() {\n    if r := recover(); r != nil && strings.Contains(fmt.Sprint(r), \"makeWindowCoders, unknown urn\") {\n        err = errors.New(\"pipeline uses unsupported windowing for prism\")\n    }\n}()","preventionTips":["Use built-in windowing transforms when targeting prism","Avoid custom WindowFn implementations with prism","Read the urn in the panic/log output to identify the unsupported coder","Track Beam issue 31921 for custom window function support"],"tags":["prism","windowing","coders"],"backgroundTag":"unsupported-operation","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"}