Repository navigation
fix(amber, v1.3): return 403 instead of 401 when a user lacks access to an execution - #9333
Conversation
…execution (#9325) ### What changes were proposed in this PR? `validateUserCanAccessExecutions` now throws `ForbiddenException` (403) instead of a 401. The frontend reads any 401 on an authenticated request as an expired session, so a read-only user who bookmarked, renamed or deleted an execution was logged out. With a 403 they stay logged in. Bookmark puts its icon back on a refusal. Rename and delete have no error handler, so they fail without a message; that is left out of this PR to keep it small. ### Any related issues, documentation, discussions? Closes #9324. ### How was this PR tested? Added a read-only bookmark case to `WorkflowExecutionsResourceSpec`, and the refusal cases now assert 403. Ran `sbt "WorkflowExecutionService/testOnly *UserQuotaResourceSpec *WorkflowExecutionsResourceSpec"`: 84 of 85 pass. The other one, the per-user warehouse case of `retrieveWorkflowRuntimeStatistics`, fails the same way locally on unmodified `main`. Putting the 401 back fails the four cases this PR touches. Not clicked through in a running instance. ### Was this PR authored or co-authored using generative AI tooling? (backported from commit 312a0ce) Generated-by: Claude Code (claude-opus-5-5)
|
Clean cherry-pick — nothing here was edited by hand. It applied to Close this PR and reopen it to start its required checks. This pull request was opened by After that: approve, and enable auto-merge if you would rather not come back when the checks finish. |
Automated Reviewer SuggestionsBased on the
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 380 | 0.232 | 26,182/33,321/33,321 us | 🔴 +8.8% / 🔴 +153.8% |
| ⚪ | bs=100 sw=10 sl=64 | 832 | 0.508 | 119,095/146,585/146,585 us | ⚪ within ±5% / 🔴 +60.9% |
| 🔴 | bs=1000 sw=10 sl=64 | 948 | 0.579 | 1,044,419/1,226,072/1,226,072 us | 🔴 +10.2% / 🔴 +37.9% |
Baseline details
Latest main 3c87a96 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 380 tuples/sec | 389 tuples/sec | 931.98 tuples/sec | -2.3% | -59.2% |
| bs=10 sw=10 sl=64 | MB/s | 0.232 MB/s | 0.238 MB/s | 0.569 MB/s | -2.5% | -59.2% |
| bs=10 sw=10 sl=64 | p50 | 26,182 us | 24,067 us | 10,818 us | +8.8% | +142.0% |
| bs=10 sw=10 sl=64 | p95 | 33,321 us | 36,555 us | 13,127 us | -8.8% | +153.8% |
| bs=10 sw=10 sl=64 | p99 | 33,321 us | 36,555 us | 16,504 us | -8.8% | +101.9% |
| bs=100 sw=10 sl=64 | throughput | 832 tuples/sec | 824 tuples/sec | 1,210 tuples/sec | +1.0% | -31.3% |
| bs=100 sw=10 sl=64 | MB/s | 0.508 MB/s | 0.503 MB/s | 0.739 MB/s | +1.0% | -31.2% |
| bs=100 sw=10 sl=64 | p50 | 119,095 us | 117,727 us | 85,326 us | +1.2% | +39.6% |
| bs=100 sw=10 sl=64 | p95 | 146,585 us | 153,440 us | 91,092 us | -4.5% | +60.9% |
| bs=100 sw=10 sl=64 | p99 | 146,585 us | 153,440 us | 102,379 us | -4.5% | +43.2% |
| bs=1000 sw=10 sl=64 | throughput | 948 tuples/sec | 961 tuples/sec | 1,240 tuples/sec | -1.4% | -23.5% |
| bs=1000 sw=10 sl=64 | MB/s | 0.579 MB/s | 0.586 MB/s | 0.757 MB/s | -1.2% | -23.5% |
| bs=1000 sw=10 sl=64 | p50 | 1,044,419 us | 1,041,360 us | 840,622 us | +0.3% | +24.2% |
| bs=1000 sw=10 sl=64 | p95 | 1,226,072 us | 1,112,560 us | 889,172 us | +10.2% | +37.9% |
| bs=1000 sw=10 sl=64 | p99 | 1,226,072 us | 1,112,560 us | 931,615 us | +10.2% | +31.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,526.80,200,128000,380,0.232,26182.12,33321.39,33321.39
1,100,10,64,20,2403.27,2000,1280000,832,0.508,119094.58,146584.69,146584.69
2,1000,10,64,20,21101.06,20000,12800000,948,0.579,1044419.17,1226072.46,1226072.46
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/v1.3 #9333 +/- ##
===============================================
Coverage 93.83% 93.83%
- Complexity 4767 4768 +1
===============================================
Files 1190 1190
Lines 48463 48463
Branches 5858 5858
===============================================
+ Hits 45475 45476 +1
Misses 1539 1539
+ Partials 1449 1448 -1
*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:
|
What changes were proposed in this PR?
Automated backport of #9325 to
release/v1.3.Source: 312a0ce · automation run
Any related issues, documentation, discussions?
Backport of #9325. Originally linked #9324.
How was this PR tested?
The backported tree built green before #9325 merged. Release-branch CI runs on this PR once it is reopened — see the comment below.
Was this PR authored or co-authored using generative AI tooling?
No.