Repository navigation
fix(amber): surface region launch failures instead of hanging - #8668
Conversation
When a region has dependee input ports (e.g. a HashJoin probe), its non-dependee operators are launched from a later advance round via syncStatusAndTransitionRegionExecutionPhase(). advanceRegionExecutions discarded those futures, so if a worker failed there (e.g. a Python UDF whose code raises NameError at load time) the error was lost: no FatalError reached the client, no operator in the region started, and the execution stayed RUNNING forever. - Keep the sync futures and fail the advance future if any fails, so AdvanceRegionExecutionsHandler reports a FatalError. - Log ControlError contents in AsyncRPCClient; it is not a Throwable, so the logger silently dropped it. - Tests: manager unit tests for a failing/succeeding second phase, and e2e csv->join->Python UDF tests, including a UDF missing `from pytexera import *`, which now fails in ~1s instead of timing out. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Backport auto-label reportThis
|
Automated Reviewer SuggestionsBased on the
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 395 | 0.241 | 25,105/30,794/30,794 us | 🔴 +11.5% / 🔴 +123.6% |
| ⚪ | bs=100 sw=10 sl=64 | 791 | 0.483 | 124,882/150,923/150,923 us | ⚪ within ±5% / 🔴 +56.3% |
| ⚪ | bs=1000 sw=10 sl=64 | 916 | 0.559 | 1,089,188/1,153,655/1,153,655 us | ⚪ within ±5% / 🔴 -25.9% |
Baseline details
Latest main e5c8511 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 395 tuples/sec | 438 tuples/sec | 935.16 tuples/sec | -9.8% | -57.8% |
| bs=10 sw=10 sl=64 | MB/s | 0.241 MB/s | 0.267 MB/s | 0.571 MB/s | -9.7% | -57.8% |
| bs=10 sw=10 sl=64 | p50 | 25,105 us | 22,511 us | 11,225 us | +11.5% | +123.6% |
| bs=10 sw=10 sl=64 | p95 | 30,794 us | 31,881 us | 13,984 us | -3.4% | +120.2% |
| bs=10 sw=10 sl=64 | p99 | 30,794 us | 31,881 us | 17,158 us | -3.4% | +79.5% |
| bs=100 sw=10 sl=64 | throughput | 791 tuples/sec | 824 tuples/sec | 1,202 tuples/sec | -4.0% | -34.2% |
| bs=100 sw=10 sl=64 | MB/s | 0.483 MB/s | 0.503 MB/s | 0.734 MB/s | -4.0% | -34.2% |
| bs=100 sw=10 sl=64 | p50 | 124,882 us | 119,444 us | 90,147 us | +4.6% | +38.5% |
| bs=100 sw=10 sl=64 | p95 | 150,923 us | 145,250 us | 96,575 us | +3.9% | +56.3% |
| bs=100 sw=10 sl=64 | p99 | 150,923 us | 145,250 us | 104,995 us | +3.9% | +43.7% |
| bs=1000 sw=10 sl=64 | throughput | 916 tuples/sec | 925 tuples/sec | 1,236 tuples/sec | -1.0% | -25.9% |
| bs=1000 sw=10 sl=64 | MB/s | 0.559 MB/s | 0.564 MB/s | 0.755 MB/s | -0.9% | -25.9% |
| bs=1000 sw=10 sl=64 | p50 | 1,089,188 us | 1,080,558 us | 888,237 us | +0.8% | +22.6% |
| bs=1000 sw=10 sl=64 | p95 | 1,153,655 us | 1,170,219 us | 927,592 us | -1.4% | +24.4% |
| bs=1000 sw=10 sl=64 | p99 | 1,153,655 us | 1,170,219 us | 954,428 us | -1.4% | +20.9% |
Raw 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,506.66,200,128000,395,0.241,25104.68,30793.57,30793.57
1,100,10,64,20,2529.76,2000,1280000,791,0.483,124881.90,150922.83,150922.83
2,1000,10,64,20,21844.43,20000,12800000,916,0.559,1089187.64,1153654.63,1153654.63
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8668 +/- ##
============================================
- Coverage 92.58% 92.56% -0.02%
- Complexity 4981 4984 +3
============================================
Files 1244 1245 +1
Lines 52933 52767 -166
Branches 6550 6523 -27
============================================
- Hits 49006 48846 -160
+ Misses 2295 2292 -3
+ Partials 1632 1629 -3
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/request-review @aicam |
|
Removed backport label: not a regression (the behavior predates v1.2), the failure is visible rather than silent. |
Wrap the per-worker RPCs that launch a region (initializeExecutor, assignPort, openExecutor, startWorker) so a failure becomes a WorkflowRuntimeException carrying the target worker id. The existing FatalError(err, err.relatedWorkerId) in AdvanceRegionExecutionsHandler then reports it, and the UI can attribute the error to that operator. Addresses review feedback on apache#8668. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
@Ma77Ball Thanks, good call. Done in 1d583d5. The failure arrived as a plain The tests now assert the worker ID too, and they failed before this change:
|
Wrap the per-worker RPCs that launch a region (initializeExecutor, assignPort, openExecutor, startWorker) so a failure becomes a WorkflowRuntimeException carrying the target worker id. The existing FatalError(err, err.relatedWorkerId) in PortCompletedHandler then reports it, and the UI can attribute the error to that operator. Port of review feedback on apache/texera#8668. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
@sshiv012 there does appear to be a failing test in the |
The amber CI job has no Python environment, so the e2e tests that started a real Python worker could not run there. Use a Java UDF whose code does not compile instead: it fails in initializeExecutor exactly like a Python UDF with an import error, with no external runtime. The happy path stays covered by the existing join e2e test and the WorkflowExecutionManagerSpec unit test. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Fixed in d784f5d. The new e2e tests started a real Python worker, which passed locally but not in CI, because CI's amber job has no Python environment?? The test now uses a Java UDF that fails to compile at the same setup step, so it needs no Python. |
… errors (apache#8771) ### What changes were proposed in this PR? Two small hints in the workspace: - **Kill button tooltip:** "Stop this run. A stopped run can't be resumed." It was an icon-only button with no explanation. - **Empty Result panel:** the heading now says why it is empty: "No operator is selected." or "This operator has no results yet." With nothing selected it also says "Click an operator to see its results. If a run fails, its errors show here." It always adds "Errors an operator hits while running show in that operator's Console." A failed run's errors only appear in the Static Error tab when nothing is selected, and errors during a run pause it and go to the operator's Console. Neither hint shows while previewing a workflow version. Before and after, with nothing selected (top) and an operator selected (middle). The bottom row (a failed UDF showing its Static Error tab when clicked) is no longer part of this PR: on main that error still arrives as "unknown operator", because `ControlError` drops the worker that apache#8668 attaches. That will be fixed in the backend in a separate PR. <img width="1648" height="854" alt="texera-8771-before-after-v2" src="https://github.com/user-attachments/assets/b1034c28-ce7d-4baf-b2f2-cfd935bc503e" /> The tooltip is a native `title`, which browsers don't draw in screenshots. I checked it in the running app: hovering the red button shows "Stop this run. A stopped run can't be resumed." ### Any related issues, documentation, discussions? Part of apache#8736. Split out of apache#8737. ### How was this PR tested? New specs in `result-panel.component.spec.ts` (nothing selected, an operator selected, version preview) and `menu.component.spec.ts` (the tooltip). ``` cd frontend yarn test --include src/app/workspace/component/result-panel/result-panel.component.spec.ts --include src/app/workspace/component/menu/menu.component.spec.ts yarn test yarn format:ci ``` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) --------- Co-authored-by: suryaacharan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
What changes were proposed in this PR?
A worker failing to initialize in a region's second (non-dependee) phase, e.g. a Python UDF after a HashJoin, used to leave the execution
RUNNINGforever with no error. See the issue for the full chain.WorkflowExecutionManager.advanceRegionExecutions: keep thesyncStatusAndTransitionRegionExecutionPhase()futures instead of dropping them in aforeach. The advance future now fails if any sync fails, so the existing.onFailure → FatalErrorinAdvanceRegionExecutionsHandlerreports it. The rest of the method moved unchanged intoadvanceToNextRegions.RegionExecutionManager: a failed launch RPC (initializeExecutor,assignPort,openExecutor,startWorker) is wrapped asWorkflowRuntimeExceptionwith the target worker ID, so theFatalErrornames the failing worker and operator (review feedback).AsyncRPCClient.logControlReply: log theControlErrormessage, details and stack trace. It isn't aThrowable, so the logger silently dropped it.from pytexera import *after a joinname 'UDFTableOperator' is not defined, attributed to the UDF workerreceived error from …received error from … (controlID: N): <message>Behavior note: the future returned by
advanceRegionExecutionsnow also waits on, and fails with, the syncs it triggers.AdvanceRegionExecutionsHandlerdoesn't wait on it.StartWorkflowHandlerhas no unfinished regions at start, so nothing changes there.Any related issues, documentation, discussions?
Closes #8667
How was this PR tested?
Added tests. Each new failing-case test fails before the fix and passes after it.
WorkflowExecutionManagerSpec, 2 new tests: a region whose probe op has a dependee port, followed by a UDF op.initializeExecutorreturns aControlError→ the advance fails with that message.DataProcessingSpec, 1 new e2e test on csv, csv → join → UDF: a Java UDF whose code doesn't compile, so the worker fails ininitializeExecutor, the same step as a Python UDF with an import error.RegionExecutionManagerTestSupport:CoordinatorRpcProbetakes an optionalinitializeExecutorResponse.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5.5)
🤖 Generated with Claude Code