{"record":{"id":"6bb18f6bfdeca090","repo":"apache/beam","slug":"unexpected-progress-shape-s","errorCode":null,"errorMessage":"Unexpected progress shape: %s","messagePattern":"Unexpected progress shape: (.+?)","errorType":"exception","errorClass":"AssertionError","httpStatus":null,"severity":"error","filePath":"sdks/java/io/synthetic/src/main/java/org/apache/beam/sdk/io/synthetic/SyntheticBoundedSource.java","lineNumber":248,"sourceCode":"\n      return true;\n    }\n\n    private boolean shouldSourceSplit() {\n      return (splitPointFrequencyRecords == 0) || (currentOffset % splitPointFrequencyRecords == 0);\n    }\n\n    @Override\n    public Double getFractionConsumed() {\n      double realFractionConsumed = super.getFractionConsumed();\n      SyntheticSourceOptions.ProgressShape shape = getCurrentSource().sourceOptions.progressShape;\n      switch (shape) {\n        case LINEAR:\n          return realFractionConsumed;\n        case LINEAR_REGRESSING:\n          return 0.9 - 0.8 * realFractionConsumed;\n        default:\n          throw new AssertionError(\"Unexpected progress shape: \" + shape);\n      }\n    }\n\n    @Override\n    protected boolean isAtSplitPoint() throws NoSuchElementException {\n      return isAtSplitPoint;\n    }\n\n    @Override\n    public void close() {\n      // Nothing\n    }\n  }\n}\n","sourceCodeStart":230,"sourceCodeEnd":263,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/synthetic/src/main/java/org/apache/beam/sdk/io/synthetic/SyntheticBoundedSource.java#L230-L263","documentation":"SyntheticBoundedSource's reader supports configurable progress-reporting shapes (LINEAR, LINEAR_REGRESSING) used to test runner watermark/fraction-consumed handling. getFractionConsumed() throws AssertionError when the configured SyntheticOptions progress shape is not one of the supported enum values, indicating an internal invariant violation or an added enum case not handled in the switch.","triggerScenarios":"Setting a progress shape in SyntheticOptions (e.g., via synthetic source options JSON in test pipelines) that is neither LINEAR nor LINEAR_REGRESSING, then having the runner call getFractionConsumed(); also hit when a new ProgressDirection enum value is added without updating this switch.","commonSituations":"Running Beam perf-test harnesses with synthetic source option JSON specifying an unsupported/typo'd shape; internal Beam development when extending progress directions.","solutions":["Inspect the SyntheticOptions in your test pipeline and set the progress shape to LINEAR or LINEAR_REGRESSING.","Fix the options JSON/flag so the parsed enum matches a supported value (watch for typos or parsing producing an unexpected default).","If you added a new shape enum value, add the corresponding case to getFractionConsumed()."],"exampleFix":"// before (options JSON)\n{\"numRecords\": 1000, \"progressShape\": \"EXPONENTIAL\"}\n// after\n{\"numRecords\": 1000, \"progressShape\": \"LINEAR\"}","handlingStrategy":"validation","validationCode":"// Java — validate progress shape before launching synthetic pipeline\nString shape = optionsJson.get(\"progressShape\").asText();\nif (!shape.equals(\"LINEAR\") && !shape.equals(\"LINEAR_REGRESSING\")) {\n  throw new IllegalArgumentException(\"Unsupported progressShape: \" + shape);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only use progress shapes documented for your Beam version (LINEAR, LINEAR_REGRESSING).","Copy option JSON from the matching Beam version's test resources.","If extending the enum, update every switch over it."],"tags":["apache-beam","java","synthetic-source","internal"],"backgroundTag":"invalid-enum-value","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"}