apache/beam · error · Error

Per-pipeline options not supported.

Error message

Per-pipeline options not supported.

What it means

MultiPipelineRunner batches multiple pipelines and applies a single global options set, so runPipeline() rejects any per-pipeline PipelineOptions argument with 'Per-pipeline options not supported.' It enforces that all pipelines in a multi-pipeline run share the same configuration.

Solutions

  1. Call runPipeline(pipeline) without the options argument and pass options when constructing the MultiPipelineRunner instead.
  2. Set options once on the MultiPipelineRunner so they apply to all merged pipelines.
  3. Remove per-pipeline customization if using the multi-pipeline test harness.

Example fix

// before
multiRunner.runPipeline(pipeline, myOptions);
// after
multiRunner.runPipeline(pipeline); // options supplied at MultiPipelineRunner construction
Defensive patterns

Strategy: validation

Validate before calling

if (options !== undefined) {
  throw new Error("MultiPipelineRunner: pass options to the constructor, not runPipeline");
}

Type guard

null

Try / catch

try {
  await multiRunner.runPipeline(pipeline, options);
} catch (e) {
  if (e.message === "Per-pipeline options not supported.") {
    console.error("Set options on the MultiPipelineRunner instead.");
  } else throw e;
}

Prevention

When it happens

Trigger: Calling runPipeline(pipeline, options) on a MultiPipelineRunner instance with a non-undefined options argument.

Common situations: Refactoring code that previously used the standard runner (which accepts per-pipeline options) to the multi-pipeline test runner, without removing the options parameter.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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

Appendix: source

Thrown at sdks/typescript/src/apache_beam/testing/multi_pipeline_runner.ts:98

      this.setNextTestName("pipeline");
    }
    this.usedTestNames.add(this.nextTestName!);
    const p = new Pipeline(this.getPrefix());
    await new Root(p).applyAsync(
      withName(this.nextTestName!, async (root) => {
        await pipeline(root);
      }),
    );
    this.nextTestName = undefined;
    return this.runPipeline(p.getProto());
  }

  async runPipeline(
    pipeline: runnerApi.Pipeline,
    options?: PipelineOptions,
  ): Promise<PipelineResult> {
    if (options) {
      throw new Error("Per-pipeline options not supported.");
    }
    this.mergePipeline(pipeline);
    return new FakePipelineResult();
  }

  async reallyRunPipelines() {
    if (this.allPipelines === undefined) {
      return new FakePipelineResult();
    }
    console.log(this.allPipelines);
    const pipelineResult = await this.underlying.runPipeline(
      this.allPipelines,
      this.options,
    );
    const finalState = await pipelineResult.waitUntilFinish();
    if (finalState != jobApi.JobState_Enum.DONE) {
      // TODO: Grab the last/most severe error message?
      throw new Error(

View on GitHub (pinned to 12126d8942)