apache/beam · error

pipeline is not performant, see diagnostic summary

Error message

pipeline is not performant, see diagnostic summary:
%s
%s

What it means

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'.

Solutions

  1. Read the diagnostic summary and generated 'main' included with the error; fix each flagged element.
  2. Register all DoFns and functions with beam/register so reflection is unnecessary.
  3. Restructure pipeline stages vet marks non-performant.
  4. If strict vet gating is not required, stop calling vet.Execute for this pipeline.

Example fix

// before
func init() { register.DoFn2x0[int, func(int)](&myDoFn{}) }
// helperFn still resolved reflectively
// after
func init() {
	register.DoFn2x0[int, func(int)](&myDoFn{})
	register.Function2x0[int, func(int)](helperFn)
}
Defensive patterns

Strategy: try-catch

Validate before calling

if e, err := vet.Evaluate(ctx, p); err == nil && !e.Performant() {
	return errors.New("pipeline will fail strict vet; register symbols and remove reflective paths")
}

Try / catch

_, err := vet.Execute(ctx, p)
if err != nil {
	var perfErr *errors.Error
	if errors.As(err, &perfErr) && strings.Contains(err.Error(), "not performant") {
		// log the diagnostic summary, fix flagged constructs, re-run
	}
}

Prevention

When it happens

Trigger: vet.Execute called on a pipeline whose Performant() is false: any unresolved/unregistered symbol, reflection-based DoFn, or construct vet cannot statically analyze.

Common situations: Using vet as a CI linter before submitting; pipelines mixing registered and unregistered DoFns; using features vet does not support, forcing reflection fallback.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/f952f03fc4e2302a. Report an issue: GitHub.

Appendix: source

Thrown at sdks/go/pkg/beam/runners/vet/vet.go:71

// We want clear failures when looking up symbols so we can tell if something has been
// registered properly or not.
type disabledResolver bool

func (p disabledResolver) Sym2Addr(name string) (uintptr, error) {
	return 0, errors.Errorf("%v not found. Register DoFns and functions with the beam/register package.", name)
}

// Execute evaluates the pipeline on whether it can run without reflection.
func Execute(ctx context.Context, p *beam.Pipeline) (beam.PipelineResult, error) {
	e, err := Evaluate(ctx, p)
	if err != nil {
		return nil, errors.WithContext(err, "validating pipeline with vet runner")
	}
	if !e.Performant() {
		e.summary()
		e.Generate("main")
		e.diag("*/\n")
		err := errors.Errorf("pipeline is not performant, see diagnostic summary:\n%s\n%s", e.d.String(), string(e.Bytes()))
		err = errors.WithContext(err, "validating pipeline with vet runner")
		return nil, errors.SetTopLevelMsg(err, "pipeline is not performant")
	}
	// Pipeline nas no further tasks.
	return nil, nil
}

// Evaluate returns an object that can generate necessary shims and inits.
func Evaluate(_ context.Context, p *beam.Pipeline) (*Eval, error) {
	// Disable the resolver so we can see functions that are that are already registered.
	r := runtime.Resolver
	runtime.Resolver = disabledResolver(false)
	// Reinstate the resolver when we're through.
	defer func() { runtime.Resolver = r }()

	edges, _, err := p.Build()
	if err != nil {
		return nil, errors.New("can't get data to generate")

View on GitHub (pinned to 12126d8942)