You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "tanishqgandhi1908 (via GitHub)" <gi...@apache.org> on 2026/06/19 01:07:18 UTC
[PR] fix(amber): surface real cause when output port schema is unavailable [texera]
tanishqgandhi1908 opened a new pull request, #5784:
URL: https://github.com/apache/texera/pull/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?
Generated-by: Claude Code (Claude Opus 4.8)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): surface real cause when output port schema is unavailable [texera]
Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang commented on PR #5784:
URL: https://github.com/apache/texera/pull/5784#issuecomment-4781846851
@xuang7 maybe we can skip backport this: it is more like an improvement on the error message.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): surface real cause when output port schema is unavailable [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #5784:
URL: https://github.com/apache/texera/pull/5784#issuecomment-4747447490
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/5784?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 53.27%. Comparing base ([`731d671`](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`7716178`](https://app.codecov.io/gh/apache/texera/commit/77161783cfab2d89753160b8459b9b90d3654e11?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:white_check_mark: All tests successful. No failed tests found.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #5784 +/- ##
============================================
- Coverage 53.30% 53.27% -0.03%
+ Complexity 2668 2664 -4
============================================
Files 1098 1098
Lines 42532 42532
Branches 4575 4575
============================================
- Hits 22673 22661 -12
- Misses 18530 18540 +10
- Partials 1329 1331 +2
```
| [Flag](https://app.codecov.io/gh/apache/texera/pull/5784/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
|---|---|---|---|
| [access-control-service](https://app.codecov.io/gh/apache/texera/pull/5784/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.44% <ø> (ø)` | | Carriedforward from [731d671](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [agent-service](https://app.codecov.io/gh/apache/texera/pull/5784/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `34.36% <ø> (ø)` | | Carriedforward from [731d671](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [amber](https://app.codecov.io/gh/apache/texera/pull/5784/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `53.74% <ø> (-0.08%)` | :arrow_down: | |
| [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/5784/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `1.65% <ø> (ø)` | | Carriedforward from [731d671](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [config-service](https://app.codecov.io/gh/apache/texera/pull/5784/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.71% <ø> (ø)` | | Carriedforward from [731d671](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [file-service](https://app.codecov.io/gh/apache/texera/pull/5784/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.06% <ø> (ø)` | | Carriedforward from [731d671](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [frontend](https://app.codecov.io/gh/apache/texera/pull/5784/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `48.00% <ø> (ø)` | | Carriedforward from [731d671](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [pyamber](https://app.codecov.io/gh/apache/texera/pull/5784/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `90.13% <ø> (ø)` | | Carriedforward from [731d671](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [python](https://app.codecov.io/gh/apache/texera/pull/5784/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `90.80% <ø> (ø)` | | Carriedforward from [731d671](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/5784/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `58.69% <ø> (ø)` | | Carriedforward from [731d671](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
*This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/5784?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): surface real cause when output port schema is unavailable [texera]
Posted by "chenlica (via GitHub)" <gi...@apache.org>.
chenlica commented on PR #5784:
URL: https://github.com/apache/texera/pull/5784#issuecomment-4760850934
@aicam Please review this PR as requested by @aglinxinyuan .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): surface real cause when output port schema is unavailable [texera]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #5784:
URL: https://github.com/apache/texera/pull/5784#discussion_r3440711283
##########
amber/src/main/scala/org/apache/texera/amber/engine/architecture/scheduling/RegionExecutionCoordinator.scala:
##########
@@ -572,10 +572,18 @@ class RegionExecutionCoordinator(
val portBaseURI = portConfig.storageURIBase
val resultURI = VFSURIFactory.resultURI(portBaseURI)
val stateURI = VFSURIFactory.stateURI(portBaseURI)
- val schemaOptional =
- region.getOperator(outputPortId.opId).outputPorts(outputPortId.portId)._3
val schema =
- schemaOptional.getOrElse(throw new IllegalStateException("Schema is missing"))
+ region.getOperator(outputPortId.opId).outputPorts(outputPortId.portId)._3 match {
+ case Right(resolvedSchema) => resolvedSchema
+ case Left(cause) =>
+ // The output port schema failed to resolve (e.g. a dataset the workflow reads is not
+ // shared with the running user, making its file and inferred schema unavailable).
+ // Surface the underlying cause instead of a generic "Schema is missing" (issue #3546).
+ throw new IllegalStateException(
+ s"Failed to resolve the output schema: ${cause.getMessage}",
+ cause
+ )
+ }
Review Comment:
`cause.getMessage` can be null for some Throwables, which would produce an unhelpful error message ("...: null"). It’s also useful to include the failing `outputPortId` so users can identify which output port/schema failed when there are multiple outputs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): surface real cause when output port schema is unavailable [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5784:
URL: https://github.com/apache/texera/pull/5784#issuecomment-4747415869
<!-- texera-benchmarks-comment -->
## ⚠️ Benchmark changes need a look
🟢 2 better · 🔴 3 worse · ⚪ 10 noise (<±5%) · 0 without baseline
> Compared against main `731d671` benchmarked on **this same runner**, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.
[Dashboard](https://apache.github.io/texera/dev/bench/) · [Run](https://github.com/apache/texera/actions/runs/27799110820)
| | config | throughput | MB/s | latency | max Δ latest / 7d |
|---|---|---:|---:|---:|---:|
| 🔴 | bs=10 sw=10 sl=64 | 420 | 0.256 | 22,960/33,441/33,441 us | 🔴 +13.1% / ⚪ within ±5% |
| 🟢 | bs=100 sw=10 sl=64 | 971 | 0.593 | 101,645/127,382/127,382 us | 🟢 -12.5% / 🟢 -9.5% |
| ⚪ | bs=1000 sw=10 sl=64 | 1,099 | 0.671 | 916,601/968,959/968,959 us | ⚪ within ±5% / 🟢 -5.8% |
<details><summary>Baseline details</summary>
Latest main `731d671` from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---:|---:|---:|---:|---:|
| bs=10 sw=10 sl=64 | throughput | 420 tuples/sec | 466 tuples/sec | 410.82 tuples/sec | -9.9% | +2.2% |
| bs=10 sw=10 sl=64 | MB/s | 0.256 MB/s | 0.284 MB/s | 0.251 MB/s | -9.9% | +2.1% |
| bs=10 sw=10 sl=64 | p50 | 22,960 us | 20,301 us | 23,785 us | +13.1% | -3.5% |
| bs=10 sw=10 sl=64 | p95 | 33,441 us | 33,724 us | 34,980 us | -0.8% | -4.4% |
| bs=10 sw=10 sl=64 | p99 | 33,441 us | 33,724 us | 34,980 us | -0.8% | -4.4% |
| bs=100 sw=10 sl=64 | throughput | 971 tuples/sec | 948 tuples/sec | 891.94 tuples/sec | +2.4% | +8.9% |
| bs=100 sw=10 sl=64 | MB/s | 0.593 MB/s | 0.579 MB/s | 0.544 MB/s | +2.4% | +8.9% |
| bs=100 sw=10 sl=64 | p50 | 101,645 us | 99,971 us | 112,277 us | +1.7% | -9.5% |
| bs=100 sw=10 sl=64 | p95 | 127,382 us | 145,644 us | 139,802 us | -12.5% | -8.9% |
| bs=100 sw=10 sl=64 | p99 | 127,382 us | 145,644 us | 139,802 us | -12.5% | -8.9% |
| bs=1000 sw=10 sl=64 | throughput | 1,099 tuples/sec | 1,106 tuples/sec | 1,041 tuples/sec | -0.6% | +5.6% |
| bs=1000 sw=10 sl=64 | MB/s | 0.671 MB/s | 0.675 MB/s | 0.635 MB/s | -0.6% | +5.6% |
| bs=1000 sw=10 sl=64 | p50 | 916,601 us | 909,111 us | 972,714 us | +0.8% | -5.8% |
| bs=1000 sw=10 sl=64 | p95 | 968,959 us | 967,578 us | 1,023,057 us | +0.1% | -5.3% |
| bs=1000 sw=10 sl=64 | p99 | 968,959 us | 967,578 us | 1,023,057 us | +0.1% | -5.3% |
</details>
<details><summary>Raw CSV</summary>
```csv
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,476.46,200,128000,420,0.256,22960.24,33440.85,33440.85
1,100,10,64,20,2058.87,2000,1280000,971,0.593,101644.79,127382.46,127382.46
2,1000,10,64,20,18205.72,20000,12800000,1099,0.671,916601.13,968959.39,968959.39
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): surface real cause when output port schema is unavailable [texera]
Posted by "tanishqgandhi1908 (via GitHub)" <gi...@apache.org>.
tanishqgandhi1908 commented on code in PR #5784:
URL: https://github.com/apache/texera/pull/5784#discussion_r3444473966
##########
amber/src/main/scala/org/apache/texera/amber/engine/architecture/scheduling/RegionExecutionCoordinator.scala:
##########
@@ -572,10 +572,18 @@ class RegionExecutionCoordinator(
val portBaseURI = portConfig.storageURIBase
val resultURI = VFSURIFactory.resultURI(portBaseURI)
val stateURI = VFSURIFactory.stateURI(portBaseURI)
- val schemaOptional =
- region.getOperator(outputPortId.opId).outputPorts(outputPortId.portId)._3
val schema =
- schemaOptional.getOrElse(throw new IllegalStateException("Schema is missing"))
+ region.getOperator(outputPortId.opId).outputPorts(outputPortId.portId)._3 match {
+ case Right(resolvedSchema) => resolvedSchema
+ case Left(cause) =>
+ // The output port schema failed to resolve (e.g. a dataset the workflow reads is not
+ // shared with the running user, making its file and inferred schema unavailable).
+ // Surface the underlying cause instead of a generic "Schema is missing" (issue #3546).
+ throw new IllegalStateException(
+ s"Failed to resolve the output schema: ${cause.getMessage}",
+ cause
+ )
+ }
Review Comment:
both addressed in the latest push -
Null getMessage: the message now uses Option(cause.getMessage).getOrElse(cause.toString), so a cause without a message (e.g. an NPE) surfaces its class name instead of "…: null". Added a regression test (fall back to the throwable's string form when the cause has no message) that asserts this.
Failing port id: I kept it out of the user-facing message on purpose, the raw GlobalPortIdentity(...) is developer detail and this error already surfaces at the workflow level in the UI. Instead it's now logged server-side via logger.error(s"Output schema unavailable for port $outputPortId", cause)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): surface real cause when output port schema is unavailable [texera]
Posted by "aicam (via GitHub)" <gi...@apache.org>.
aicam merged PR #5784:
URL: https://github.com/apache/texera/pull/5784
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): surface real cause when output port schema is unavailable [texera]
Posted by "aicam (via GitHub)" <gi...@apache.org>.
aicam commented on PR #5784:
URL: https://github.com/apache/texera/pull/5784#issuecomment-4773226317
I am not familiar with Amber Engine, thanks @Yicong-Huang for review
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): surface real cause when output port schema is unavailable [texera]
Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang commented on PR #5784:
URL: https://github.com/apache/texera/pull/5784#issuecomment-5126195883
Backport PR opened: draft#7104 (https://github.com/apache/texera/pull/7104) to `release/v1.2`, assigned to @tanishqgandhi1908 — part of a backport-coverage audit (the cherry-pick conflicts and needs manual resolution).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): surface real cause when output port schema is unavailable [texera]
Posted by "xuang7 (via GitHub)" <gi...@apache.org>.
xuang7 commented on PR #5784:
URL: https://github.com/apache/texera/pull/5784#issuecomment-4781876692
> @xuang7 maybe we can skip backport this: it is more like an improvement on the error message.
Ok! We can remove the label if it is not needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org