{"record":{"id":"f952f03fc4e2302a","repo":"apache/beam","slug":"pipeline-is-not-performant-see-diagnostic-summary-s-s","errorCode":null,"errorMessage":"pipeline is not performant, see diagnostic summary:\n%s\n%s","messagePattern":"pipeline is not performant, see diagnostic summary:\n(.+?)\n(.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/runners/vet/vet.go","lineNumber":71,"sourceCode":"// We want clear failures when looking up symbols so we can tell if something has been\n// registered properly or not.\ntype disabledResolver bool\n\nfunc (p disabledResolver) Sym2Addr(name string) (uintptr, error) {\n\treturn 0, errors.Errorf(\"%v not found. Register DoFns and functions with the beam/register package.\", name)\n}\n\n// Execute evaluates the pipeline on whether it can run without reflection.\nfunc Execute(ctx context.Context, p *beam.Pipeline) (beam.PipelineResult, error) {\n\te, err := Evaluate(ctx, p)\n\tif err != nil {\n\t\treturn nil, errors.WithContext(err, \"validating pipeline with vet runner\")\n\t}\n\tif !e.Performant() {\n\t\te.summary()\n\t\te.Generate(\"main\")\n\t\te.diag(\"*/\\n\")\n\t\terr := errors.Errorf(\"pipeline is not performant, see diagnostic summary:\\n%s\\n%s\", e.d.String(), string(e.Bytes()))\n\t\terr = errors.WithContext(err, \"validating pipeline with vet runner\")\n\t\treturn nil, errors.SetTopLevelMsg(err, \"pipeline is not performant\")\n\t}\n\t// Pipeline nas no further tasks.\n\treturn nil, nil\n}\n\n// Evaluate returns an object that can generate necessary shims and inits.\nfunc Evaluate(_ context.Context, p *beam.Pipeline) (*Eval, error) {\n\t// Disable the resolver so we can see functions that are that are already registered.\n\tr := runtime.Resolver\n\truntime.Resolver = disabledResolver(false)\n\t// Reinstate the resolver when we're through.\n\tdefer func() { runtime.Resolver = r }()\n\n\tedges, _, err := p.Build()\n\tif err != nil {\n\t\treturn nil, errors.New(\"can't get data to generate\")","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/vet/vet.go#L53-L89","documentation":"vet.Execute evaluates the pipeline and finds it is not 'performant' — it cannot run fully without reflection or contains constructs vet flags. The runner prints a diagnostic summary and a generated 'main' file, then returns this error with top-level message 'pipeline is not performant'.","triggerScenarios":"vet.Execute called on a pipeline whose Performant() is false: any unresolved/unregistered symbol, reflection-based DoFn, or construct vet cannot statically analyze.","commonSituations":"Using vet as a CI linter before submitting; pipelines mixing registered and unregistered DoFns; using features vet does not support, forcing reflection fallback.","solutions":["Read the diagnostic summary and generated 'main' included with the error; fix each flagged element.","Register all DoFns and functions with beam/register so reflection is unnecessary.","Restructure pipeline stages vet marks non-performant.","If strict vet gating is not required, stop calling vet.Execute for this pipeline."],"exampleFix":"// before\nfunc init() { register.DoFn2x0[int, func(int)](&myDoFn{}) }\n// helperFn still resolved reflectively\n// after\nfunc init() {\n\tregister.DoFn2x0[int, func(int)](&myDoFn{})\n\tregister.Function2x0[int, func(int)](helperFn)\n}","handlingStrategy":"try-catch","validationCode":"if e, err := vet.Evaluate(ctx, p); err == nil && !e.Performant() {\n\treturn errors.New(\"pipeline will fail strict vet; register symbols and remove reflective paths\")\n}","typeGuard":null,"tryCatchPattern":"_, err := vet.Execute(ctx, p)\nif err != nil {\n\tvar perfErr *errors.Error\n\tif errors.As(err, &perfErr) && strings.Contains(err.Error(), \"not performant\") {\n\t\t// log the diagnostic summary, fix flagged constructs, re-run\n\t}\n}","preventionTips":["Register all DoFns/functions so no reflection fallback exists.","Run vet as a pre-commit/CI linter.","Keep pipeline constructs within vet's supported set."],"tags":["go","beam","performance","vet"],"backgroundTag":"schema-validation-failed","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"}