fix(amber): report an uninitialized execution, not an NPE - #7848
fix(amber): report an uninitialized execution, not an NPE#7848Amer-Mukhtar wants to merge 1 commit into
Conversation
Automated Reviewer SuggestionsBased on the
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 387 | 0.236 | 25,642/33,720/33,720 us | 🔴 +13.9% / 🔴 +124.9% |
| 🔴 | bs=100 sw=10 sl=64 | 901 | 0.55 | 107,672/159,472/159,472 us | 🔴 +7.7% / 🔴 +50.4% |
| ⚪ | bs=1000 sw=10 sl=64 | 1,095 | 0.669 | 907,968/960,505/960,505 us | ⚪ within ±5% / 🟢 -7.6% |
Baseline details
Latest main b7c33b0 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 387 tuples/sec | 442 tuples/sec | 780.31 tuples/sec | -12.4% | -50.4% |
| bs=10 sw=10 sl=64 | MB/s | 0.236 MB/s | 0.27 MB/s | 0.476 MB/s | -12.6% | -50.4% |
| bs=10 sw=10 sl=64 | p50 | 25,642 us | 22,515 us | 12,590 us | +13.9% | +103.7% |
| bs=10 sw=10 sl=64 | p95 | 33,720 us | 30,704 us | 14,995 us | +9.8% | +124.9% |
| bs=10 sw=10 sl=64 | p99 | 33,720 us | 30,704 us | 19,141 us | +9.8% | +76.2% |
| bs=100 sw=10 sl=64 | throughput | 901 tuples/sec | 896 tuples/sec | 1,006 tuples/sec | +0.6% | -10.4% |
| bs=100 sw=10 sl=64 | MB/s | 0.55 MB/s | 0.547 MB/s | 0.614 MB/s | +0.5% | -10.4% |
| bs=100 sw=10 sl=64 | p50 | 107,672 us | 111,341 us | 99,387 us | -3.3% | +8.3% |
| bs=100 sw=10 sl=64 | p95 | 159,472 us | 148,109 us | 106,056 us | +7.7% | +50.4% |
| bs=100 sw=10 sl=64 | p99 | 159,472 us | 148,109 us | 113,689 us | +7.7% | +40.3% |
| bs=1000 sw=10 sl=64 | throughput | 1,095 tuples/sec | 1,108 tuples/sec | 1,043 tuples/sec | -1.2% | +5.0% |
| bs=1000 sw=10 sl=64 | MB/s | 0.669 MB/s | 0.676 MB/s | 0.637 MB/s | -1.0% | +5.1% |
| bs=1000 sw=10 sl=64 | p50 | 907,968 us | 903,972 us | 965,215 us | +0.4% | -5.9% |
| bs=1000 sw=10 sl=64 | p95 | 960,505 us | 953,380 us | 1,009,610 us | +0.7% | -4.9% |
| bs=1000 sw=10 sl=64 | p99 | 960,505 us | 953,380 us | 1,039,108 us | +0.7% | -7.6% |
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,517.23,200,128000,387,0.236,25642.37,33720.23,33720.23
1,100,10,64,20,2220.56,2000,1280000,901,0.550,107671.91,159471.93,159471.93
2,1000,10,64,20,18259.23,20000,12800000,1095,0.669,907967.81,960505.48,960505.48
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7848 +/- ##
============================================
- Coverage 91.87% 91.86% -0.01%
+ Complexity 4510 4507 -3
============================================
Files 1173 1173
Lines 47350 47350
Branches 5306 5306
============================================
- Hits 43502 43498 -4
- Misses 2204 2205 +1
- Partials 1644 1647 +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:
|
Backport auto-label reportThis
|
Description
What changes were proposed in this PR?
In myOnMsg, the case other arm read the current execution with workflowStateOpt.map(_.executionService.getValue). executionService is a BehaviorSubject seeded with null, so map wraps that null into Some(null) and the case None arm never runs. A runtime frame arriving before an execution exists therefore fails with a NullPointerException on value.wsInput instead of the intended IllegalStateException("workflow execution is not initialized").
The arm now reads executionStateOpt, the null safe value already computed at the top of the method, so an absent execution reaches the case None arm and the intended message is produced.
The same gap in the ModifyLogicRequest branch is outside the scope of this issue and remains recorded in the spec's header comment.
Any related issues, documentation, discussions?
Closes #7454
How was this PR tested?
WorkflowWebsocketResourceSpec gains a case covering a session with a workflow attached and no execution yet, asserting the IllegalStateException, its message, and the WorkflowErrorEvent sent to the socket. The existing case with no workflow attached covers the other half of the same guard.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code