{"record":{"id":"22a1a6b5668644a3","repo":"apache/beam","slug":"notimplemented","errorCode":null,"errorMessage":"NotImplemented","messagePattern":"NotImplemented","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/typescript/src/apache_beam/runners/runner.ts","lineNumber":29,"sourceCode":" *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { JobState_Enum } from \"../proto/beam_job_api\";\nimport * as runnerApi from \"../proto/beam_runner_api\";\nimport { MonitoringInfo } from \"../proto/metrics\";\nimport { Pipeline } from \"../internal/pipeline\";\nimport { Root, PValue } from \"../pvalue\";\nimport { PipelineOptions } from \"../options/pipeline_options\";\nimport * as metrics from \"../worker/metrics\";\n\nexport class PipelineResult {\n  waitUntilFinish(duration?: number): Promise<JobState_Enum> {\n    throw new Error(\"NotImplemented\");\n  }\n\n  async rawMetrics(): Promise<MonitoringInfo[]> {\n    throw new Error(\"NotImplemented\");\n  }\n\n  // TODO: Support filtering, slicing.\n  async counters(): Promise<{ [key: string]: number }> {\n    return Object.fromEntries(\n      metrics.aggregateMetrics(\n        await this.rawMetrics(),\n        \"beam:metric:user:sum_int64:v1\",\n      ),\n    );\n  }\n\n  async distributions(): Promise<{ [key: string]: number }> {\n    return Object.fromEntries(","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/typescript/src/apache_beam/runners/runner.ts#L11-L47","documentation":"PipelineResult is a base class whose waitUntilFinish (and rawMetrics) is an abstract placeholder that unconditionally throws 'NotImplemented'. Subclasses (e.g. the portable runner's PipelineResult) are expected to override it; calling it on the base implementation means the runner never supplied a concrete result object.","triggerScenarios":"Calling pipeline.waitUntilFinish() (optionally with a duration) on a PipelineResult instance created from the base class rather than a runner-provided subclass.","commonSituations":"Using a custom or test runner that returns the base PipelineResult; constructing PipelineResult directly in tests; a runner integration bug where the concrete result type was never wired in.","solutions":["Run the pipeline with a supported runner (portable/direct) that returns a concrete PipelineResult subclass.","If implementing a custom runner, subclass PipelineResult and override waitUntilFinish/rawMetrics.","In tests, mock or subclass PipelineResult instead of using the base class directly."],"exampleFix":"// before\nnew PipelineResult().waitUntilFinish();\n// after\nclass MyResult extends PipelineResult {\n  waitUntilFinish(duration?: number): Promise<JobState_Enum> { /* poll job state */ }\n}","handlingStrategy":"type-guard","validationCode":"if (Object.getPrototypeOf(result) === PipelineResult.prototype) throw new Error('Runner returned base PipelineResult; waitUntilFinish unavailable');","typeGuard":"function hasWaitUntilFinish(r: PipelineResult): r is PipelineResult & { waitUntilFinish(d?: number): Promise<JobState_Enum> } {\n  return r.waitUntilFinish !== PipelineResult.prototype.waitUntilFinish;\n}","tryCatchPattern":"try {\n  await result.waitUntilFinish();\n} catch (e) {\n  if ((e as Error).message === 'NotImplemented') {\n    // use a runner that provides a concrete PipelineResult, or poll raw state yourself\n  } else throw e;\n}","preventionTips":["Use a supported runner that returns a concrete PipelineResult.","Never instantiate PipelineResult directly outside tests.","Override waitUntilFinish/rawMetrics in custom runner implementations."],"tags":["not-implemented","abstract-method","pipeline-result","runner"],"backgroundTag":"method-not-implemented","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"}