Skip to content

fix(amber, v1.3): return 403 instead of 401 when a user lacks access to an execution - #9333

Merged
mengw15 merged 1 commit into
release/v1.3from
backport/9325-return-403-instead-of-401-when-a-user-la-v1.3
Nov 5, 2026
Merged

mengw15 merged 1 commit into
release/v1.3from
backport/9325-return-403-instead-of-401-when-a-user-la-v1.3

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

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.

…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)
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Clean cherry-pick — nothing here was edited by hand. It applied to release/v1.3 without conflicts, and the backported tree built green before #9325 merged.

Close this PR and reopen it to start its required checks. This pull request was opened by github-actions[bot], and GitHub starts no workflow run for anything the Actions token does, so it has no checks yet. Reopening it (or pushing any commit to the branch) emits the event they subscribe to. Marking it ready for review will not — none of the three required workflows listen for that.

After that: approve, and enable auto-merge if you would rather not come back when the checks finish.

@mengw15 mengw15 closed this Nov 5, 2026
@mengw15 mengw15 reopened this Nov 5, 2026
@mengw15
mengw15 enabled auto-merge November 5, 2026 07:54
@github-actions github-actions Bot added the engine label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • No candidates found from git blame history.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

⚠️ Benchmark changes need a look

🟢 2 better · 🔴 3 worse · ⚪ 10 noise (<±5%) · 0 without baseline

Compared against main 3c87a96 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 · Run

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-commenter

codecov-commenter commented Nov 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.83%. Comparing base (3c87a96) to head (aebaadc).
✅ All tests successful. No failed tests found.

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     
Flag Coverage Δ *Carryforward flag
access-control-service 81.00% <ø> (ø) Carriedforward from 3c87a96
agent-service 99.33% <ø> (ø) Carriedforward from 3c87a96
amber 89.36% <ø> (+<0.01%) ⬆️
computing-unit-managing-service 73.67% <ø> (ø) Carriedforward from 3c87a96
config-service 87.00% <ø> (ø) Carriedforward from 3c87a96
file-service 86.32% <ø> (ø) Carriedforward from 3c87a96
frontend 96.89% <ø> (ø) Carriedforward from 3c87a96
notebook-migration-service 79.31% <ø> (ø) Carriedforward from 3c87a96
pyamber 98.18% <ø> (ø) Carriedforward from 3c87a96
workflow-compiling-service 77.58% <ø> (ø) Carriedforward from 3c87a96

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mengw15
mengw15 added this pull request to the merge queue Nov 5, 2026
Merged via the queue into release/v1.3 with commit b01953b Nov 5, 2026
24 checks passed
@mengw15
mengw15 deleted the backport/9325-return-403-instead-of-401-when-a-user-la-v1.3 branch November 5, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants