{"record":{"id":"5d7026f1c85ef47d","repo":"apache/beam","slug":"unknown-environment-v-stage","errorCode":null,"errorMessage":"unknown environment[%v]","messagePattern":"unknown environment\\[(.+?)\\]","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"sdks/go/pkg/beam/runners/prism/internal/stage.go","lineNumber":182,"sourceCode":"\n\t\t\tInput:                  input,\n\t\t\tEstimatedInputElements: estimatedElements,\n\n\t\t\tOutputData: initialState,\n\t\t\tHasTimers:  s.hasTimers,\n\n\t\t\tSinkToPCollection: s.SinkToPCollection,\n\t\t\tOutputCount:       len(s.outputs),\n\t\t}\n\t\tb.Init()\n\n\t\ts.prepareSides(b, rb.Watermark)\n\n\t\tslog.Debug(\"Execute: sdk worker transform(s)\", \"bundle\", rb)\n\t\tdefer b.Cleanup(wk)\n\t\tdataReady = b.ProcessOn(ctx, wk)\n\tdefault:\n\t\terr := fmt.Errorf(\"unknown environment[%v]\", s.envID)\n\t\tslog.Error(\"Execute\", \"error\", err)\n\t\tpanic(err)\n\t}\n\n\t// Progress + split loop.\n\tpreviousIndex := int64(-2)\n\tpreviousTotalCount := int64(-2) // Total count of all pcollection elements.\n\n\tunsplit := true\n\tbaseTick := s.baseProgTick.Load().(time.Duration)\n\tticked := false\n\tprogTick := time.NewTicker(baseTick)\n\tdefer progTick.Stop()\n\tvar dataFinished, bundleFinished bool\n\t// If we have no data outputs and timers, we still need to have progress & splits\n\t// while waiting for bundle completion.\n\tif b.OutputCount+len(b.HasTimers) == 0 {\n\t\tdataFinished = true","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/prism/internal/stage.go#L164-L200","documentation":"stage.Execute dispatches bundle processing based on the stage's environment ID; when s.envID doesn't match any known environment kind (e.g. the expected SDK/worker environments), it creates this error, logs it, and panics — terminating execution since the stage cannot be run.","triggerScenarios":"A stage's environment ID is not one prism recognizes, e.g. pipelines embedding custom or external environments, or an envID left unset by a graph-planning bug.","commonSituations":"Submitting pipelines whose environment was rewritten by another tool; using prism with environment types it doesn't support yet; internal regression in stage/env assignment during preprocessing.","solutions":["Check the pipeline's environment configuration in the submitted proto","Use the default SDK environment (docker/Go SDK harness) prism supports","Upgrade prism — support for additional environments is added over time","Report the unhandled environment value as a bug with the pipeline proto"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"supported := map[string]bool{\"urn:beam:env:docker:v1\": true, \"urn:beam:env:process:v1\": true}\nif !supported[env.GetUrn()] {\n    return fmt.Errorf(\"environment %v unsupported by prism\", env.GetUrn())\n}","typeGuard":null,"tryCatchPattern":"// Execute panics here; recover at the pipeline boundary\ndefer func() {\n    if r := recover(); r != nil {\n        err = fmt.Errorf(\"stage env failure: %v\", r)\n    }\n}()","preventionTips":["Submit pipelines with standard SDK environments","Do not rewrite environment protos with custom values","Verify prism supports your environment type before use"],"tags":["go","beam","environment","unsupported"],"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"}