The GitHub Actions job "Required Checks" on texera.git/backport/5784-surface-real-cause-when-output-port-sche-v1.2 has failed. Run started by GitHub user Yicong-Huang (triggered by Yicong-Huang).
Head commit for run: 32154a171d50f964dcad0a72b23fc0dd4c065d0e / Tanishq Gandhi <[email protected]> fix(amber): surface real cause when output port schema is unavailable (#5784) ### What changes were proposed in this PR? When a workflow run fails because an output port's schema can't be resolved, the engine threw a generic `IllegalStateException("Schema is missing")`, discarding the actual cause. It typically happens when a dataset used by the workflow has not been shared with the user running it, but nothing in the message says so. Root cause: in `RegionExecutionCoordinator.createOutputPortStorageObjects`, the output port schema is an `Either[Throwable, Schema]`, but it was unwrapped with `Either.getOrElse(throw new IllegalStateException("Schema is missing"))`. getOrElse is right-biased, so on a `Left(cause)` it evaluates the default and throws away the real cause. ``` Before: Left(cause: "no access to dataset X") --getOrElse(throw)--> "Schema is missing" After: Left(cause) --> IllegalStateException("Failed to resolve the output schema: " + cause.msg, cause) ``` The fix matches on the `Either` and, on `Left`, throws an `IllegalStateException` that keeps the original cause as the exception cause **Before / After** (the message surfaces in the workspace Result Panel → Static Error frame): | | Message | |---|---| | **Before** | Schema is missing | | **After** | Failed to resolve the output schema: <real cause> (e.g. …: User has no access to this dataset) | ### Any related issues, documentation, discussions? Closes #3546 ### How was this PR tested? Added a regression test in `RegionExecutionCoordinatorSpec` that seeds an output port with a Left(cause) schema and asserts the coordinator throws an IllegalStateException whose getCause is the original cause and whose message contains the underlying message. The existing positive-path tests in the same spec continue to pass. ``` sbt "WorkflowExecutionService/testOnly org.apache.texera.amber.engine.architecture.scheduling.RegionExecutionCoordinatorSpec" ... [info] Total number of tests run: 3 [info] Tests: succeeded 3, failed 0, canceled 0, ignored 0, pending 0 [info] All tests passed. ``` ### Was this PR authored or co-authored using generative AI tooling? (backported from commit 6433e713a08606eb952581828e8f9c360a763013) Generated-by: Claude Code (Claude Opus 4.8) Report URL: https://github.com/apache/texera/actions/runs/30512211990 With regards, GitHub Actions via GitBox
