feat(amber): reject invalid dashboard resource type - #8162
Conversation
Backport auto-label reportThis
|
Automated Reviewer SuggestionsBased on the
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 392 | 0.239 | 24,926/30,140/30,140 us | 🟢 -14.6% / 🔴 +97.9% |
| 🔴 | bs=100 sw=10 sl=64 | 779 | 0.475 | 125,092/173,495/173,495 us | 🔴 +17.4% / 🔴 +61.8% |
| ⚪ | bs=1000 sw=10 sl=64 | 904 | 0.552 | 1,100,815/1,164,866/1,164,866 us | ⚪ within ±5% / 🔴 +13.9% |
Baseline details
Latest main 70c2114 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 392 tuples/sec | 423 tuples/sec | 787.98 tuples/sec | -7.3% | -50.3% |
| bs=10 sw=10 sl=64 | MB/s | 0.239 MB/s | 0.258 MB/s | 0.481 MB/s | -7.4% | -50.3% |
| bs=10 sw=10 sl=64 | p50 | 24,926 us | 22,846 us | 12,593 us | +9.1% | +97.9% |
| bs=10 sw=10 sl=64 | p95 | 30,140 us | 35,274 us | 15,579 us | -14.6% | +93.5% |
| bs=10 sw=10 sl=64 | p99 | 30,140 us | 35,274 us | 18,786 us | -14.6% | +60.4% |
| bs=100 sw=10 sl=64 | throughput | 779 tuples/sec | 829 tuples/sec | 1,008 tuples/sec | -6.0% | -22.7% |
| bs=100 sw=10 sl=64 | MB/s | 0.475 MB/s | 0.506 MB/s | 0.615 MB/s | -6.1% | -22.8% |
| bs=100 sw=10 sl=64 | p50 | 125,092 us | 118,892 us | 100,701 us | +5.2% | +24.2% |
| bs=100 sw=10 sl=64 | p95 | 173,495 us | 147,767 us | 107,244 us | +17.4% | +61.8% |
| bs=100 sw=10 sl=64 | p99 | 173,495 us | 147,767 us | 116,122 us | +17.4% | +49.4% |
| bs=1000 sw=10 sl=64 | throughput | 904 tuples/sec | 914 tuples/sec | 1,042 tuples/sec | -1.1% | -13.2% |
| bs=1000 sw=10 sl=64 | MB/s | 0.552 MB/s | 0.558 MB/s | 0.636 MB/s | -1.1% | -13.2% |
| bs=1000 sw=10 sl=64 | p50 | 1,100,815 us | 1,088,480 us | 981,959 us | +1.1% | +12.1% |
| bs=1000 sw=10 sl=64 | p95 | 1,164,866 us | 1,193,973 us | 1,023,080 us | -2.4% | +13.9% |
| bs=1000 sw=10 sl=64 | p99 | 1,164,866 us | 1,193,973 us | 1,051,697 us | -2.4% | +10.8% |
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,509.96,200,128000,392,0.239,24925.70,30140.25,30140.25
1,100,10,64,20,2568.29,2000,1280000,779,0.475,125092.19,173495.41,173495.41
2,1000,10,64,20,22127.33,20000,12800000,904,0.552,1100815.04,1164866.27,1164866.27
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8162 +/- ##
============================================
+ Coverage 93.94% 93.96% +0.02%
- Complexity 4759 4766 +7
============================================
Files 1185 1185
Lines 48069 48097 +28
Branches 5359 5361 +2
============================================
+ Hits 45159 45195 +36
+ Misses 1480 1476 -4
+ Partials 1430 1426 -4
*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:
|
|
Closing as a duplicate of #8144, which contains the same fix and regression coverage and is already approved. |
What changes were proposed in this PR?
Return HTTP 400 when dashboard search receives an unknown resource type.
The resource dispatch currently throws
IllegalArgumentException, which Dropwizard reports as HTTP 500. The change usesBadRequestExceptionand updates both invalid input cases in the focused spec.Before: unknown resource type returns 500.
After: unknown resource type returns 400 with the existing message.
Valid resource types are unchanged.
Any related issues, documentation, discussions?
Closes #8161
How was this PR tested?
Focused tests:
sbt -no-colors "WorkflowExecutionService/testOnly org.apache.texera.web.resource.dashboard.DashboardResourceSpec"Result: 7 tests passed.
Checks:
sbt -no-colors scalafmtCheckAllsbt -no-colors "scalafixAll --check"Localhost verification on the built service:
GET /api/dashboard/publicSearch?resourceType=workflowreturned 200.GET /api/dashboard/publicSearch?resourceType=not-a-resourcereturned 400 withUnknown resource type: not-a-resource. The same request returned 500 before the change.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Codex GPT-5