Skip to content

fix: Clean up annotations and remove redundant request IDs - #9275

Merged
parshimers merged 3 commits into
apache:mainfrom
parshimers:imaxon/clarify-ops
Nov 5, 2026
Merged

parshimers merged 3 commits into
apache:mainfrom
parshimers:imaxon/clarify-ops

Conversation

@parshimers

Copy link
Copy Markdown
Member

What changes were proposed in this PR?

These are some changes Meng gave me that clean up a few things regarding the IDs requests give and some missing annotations

Any related issues, documentation, discussions?

No, it is a small change, so that would be overkill.

How was this PR tested?

It contains its own tests, it's a small change so nothing else should be necessary.

Was this PR authored or co-authored using generative AI tooling?

I believe so, but I edited the patches a little for clarity and to remove excessive comment narration.

Previously the execution IDs and workflows had to be supplied
separately, but there's no reason for this. The execution can be simply
resolved from the workflow and user.
There are some missing annotations on some resources, this patch
simply adds them to avoid any confusion.
@parshimers
parshimers requested review from kunwp1 and mengw15 and removed request for kunwp1 November 3, 2026 19:31
@parshimers parshimers added the release/v1.3 back porting to release/v1.3 label Nov 3, 2026
@parshimers
parshimers requested a review from kunwp1 November 3, 2026 19:33
@github-actions github-actions Bot added the engine label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

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

  • Contributors with relevant context: @tanishqgandhi1908, @aglinxinyuan
    You can notify them by mentioning @tanishqgandhi1908, @aglinxinyuan in a comment.

@parshimers parshimers changed the title Clean up annotations and remove redundant request IDs fix: Clean up annotations and remove redundant request IDs Nov 3, 2026
@Yicong-Huang Yicong-Huang added the release/v1.2 back porting to release/v1.2 label Nov 3, 2026
@github-actions
github-actions Bot requested a review from xuang7 November 3, 2026 19:54
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Backport auto-label report

This fix: PR was checked against each actively-supported release branch. A release/* label nominates a backport target; the branch's release manager approving this PR is what sends the fix there. The required Backport Approvals check stays red until every label below is approved, so each manager either approves or removes their own label — which is why the labels left on a merged PR are exactly the branches it reached.

Release branch Analysis
✅ release/v1.3 Already labeled — this fix is queued to backport here. @mengw15 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other.
✅ release/v1.2 Change detected on this branch — label added; this fix is queued to backport here. @xuang7 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other. Review requested.

Auto-label run.

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

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

Compared against main 8f0fe35 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 404 0.247 24,204/30,790/30,790 us 🔴 +10.3% / 🔴 +134.6%
🔴 bs=100 sw=10 sl=64 794 0.485 123,182/154,669/154,669 us 🔴 +12.5% / 🔴 +69.8%
⚪ bs=1000 sw=10 sl=64 976 0.595 1,016,817/1,072,707/1,072,707 us ⚪ within ±5% / 🔴 -21.4%
Baseline details

Latest main 8f0fe35 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 404 tuples/sec 448 tuples/sec 931.98 tuples/sec -9.8% -56.7%
bs=10 sw=10 sl=64 MB/s 0.247 MB/s 0.273 MB/s 0.569 MB/s -9.5% -56.6%
bs=10 sw=10 sl=64 p50 24,204 us 21,942 us 10,818 us +10.3% +123.7%
bs=10 sw=10 sl=64 p95 30,790 us 27,919 us 13,127 us +10.3% +134.6%
bs=10 sw=10 sl=64 p99 30,790 us 27,919 us 16,504 us +10.3% +86.6%
bs=100 sw=10 sl=64 throughput 794 tuples/sec 880 tuples/sec 1,210 tuples/sec -9.8% -34.4%
bs=100 sw=10 sl=64 MB/s 0.485 MB/s 0.537 MB/s 0.739 MB/s -9.7% -34.3%
bs=100 sw=10 sl=64 p50 123,182 us 112,352 us 85,326 us +9.6% +44.4%
bs=100 sw=10 sl=64 p95 154,669 us 137,534 us 91,092 us +12.5% +69.8%
bs=100 sw=10 sl=64 p99 154,669 us 137,534 us 102,379 us +12.5% +51.1%
bs=1000 sw=10 sl=64 throughput 976 tuples/sec 971 tuples/sec 1,240 tuples/sec +0.5% -21.3%
bs=1000 sw=10 sl=64 MB/s 0.595 MB/s 0.593 MB/s 0.757 MB/s +0.3% -21.4%
bs=1000 sw=10 sl=64 p50 1,016,817 us 1,028,769 us 840,622 us -1.2% +21.0%
bs=1000 sw=10 sl=64 p95 1,072,707 us 1,098,847 us 889,172 us -2.4% +20.6%
bs=1000 sw=10 sl=64 p99 1,072,707 us 1,098,847 us 931,615 us -2.4% +15.1%
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,494.91,200,128000,404,0.247,24203.97,30789.79,30789.79
1,100,10,64,20,2519.10,2000,1280000,794,0.485,123181.68,154668.93,154668.93
2,1000,10,64,20,20500.67,20000,12800000,976,0.595,1016816.52,1072706.66,1072706.66

@codecov-commenter

codecov-commenter commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.15%. Comparing base (8f0fe35) to head (bc33f9b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9275      +/-   ##
============================================
- Coverage     92.16%   92.15%   -0.01%     
  Complexity     4967     4967              
============================================
  Files          1267     1267              
  Lines         55507    55493      -14     
  Branches       7126     7129       +3     
============================================
- Hits          51156    51141      -15     
  Misses         2584     2584              
- Partials       1767     1768       +1     
Flag Coverage Δ *Carryforward flag
access-control-service 77.44% <ø> (ø) Carriedforward from 3f9bdd4
agent-service 99.52% <ø> (-0.01%) ⬇️ Carriedforward from 3f9bdd4
amber 86.82% <100.00%> (+0.01%) ⬆️
computing-unit-managing-service 64.02% <ø> (ø) Carriedforward from 3f9bdd4
config-service 87.61% <ø> (ø) Carriedforward from 3f9bdd4
file-service 82.29% <ø> (ø) Carriedforward from 3f9bdd4
frontend 96.47% <ø> (-0.01%) ⬇️ Carriedforward from 3f9bdd4
notebook-migration-service 83.77% <ø> (ø) Carriedforward from 3f9bdd4
pyamber 98.54% <ø> (ø) Carriedforward from 3f9bdd4
workflow-compiling-service 77.95% <ø> (ø) Carriedforward from 3f9bdd4

*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.

@kunwp1 kunwp1 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The batch bookmark/delete authorization path performs roughly 2N database round trips without bounding the input, creating a scalability bottleneck, and the affected test name is misleading.

2 open issues
What changed in this PR

This PR strengthens execution-level authorization by resolving each execution’s owning workflow, adds role annotations to quota endpoints, and expands authorization tests.

Changes:

  • Adds read/write access validation for execution history, bookmarking, deletion, renaming, and quota cleanup.
  • Protects UserQuotaResource with REGULAR/ADMIN role annotations.
  • Adds tests for authorized, unauthorized, read-only, and cross-workflow execution access.
File Review
amber/​src/​main/​scala/​org/​apache/​texera/​web/​resource/​dashboard/​user/​workflow/​WorkflowExecutionsResource.scala Moderate: Batch authorization performs roughly two database round trips per execution without an array-size bound; resolve ownership and privileges with set-based queries. Moderate: Add endpoint-level negative tests ensuring bookmark, delete, and rename reject execution IDs belonging to a different workflow.
amber/​src/​main/​scala/​org/​apache/​texera/​web/​resource/​dashboard/​user/​quota/​UserQuotaResource.scala Moderate: Add a test for a READ-only caller attempting deleteCollection, verifying that the request is rejected and the row remains.
amber/​src/​test/​scala/​org/​apache/​texera/​web/​resource/​dashboard/​user/​workflow/​WorkflowExecutionsResourceSpec.scala Tests execution ownership and read/write authorization behavior. Additional cross-workflow endpoint regression coverage is needed.
amber/​src/​test/​scala/​org/​apache/​texera/​web/​resource/​dashboard/​user/​quota/​UserQuotaResourceSpec.scala Nit: Rename the unauthorized-access test to clearly describe the authorization condition rather than a caller “mistaking” the execution ID.

Review effort: Lite

@parshimers
parshimers enabled auto-merge November 4, 2026 17:12
@parshimers
parshimers added this pull request to the merge queue Nov 5, 2026
Merged via the queue into apache:main with commit 19699e3 Nov 5, 2026
24 checks passed
@parshimers
parshimers deleted the imaxon/clarify-ops branch November 5, 2026 00:38
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Backport PR opened: draft #9317 (#9317) to release/v1.2, assigned to @parshimers — needs manual work because the cherry-pick conflicts.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Backport PR opened: draft #9318 (#9318) to release/v1.3, assigned to @parshimers — needs manual work because the cherry-pick conflicts.

xuang7 added a commit that referenced this pull request Nov 10, 2026
Keep only the tests #9275 added to WorkflowExecutionsResourceSpec; the rest of the conflict block was main-only test code. UserQuotaResourceSpec does not exist on release/v1.2, so the whole file comes along: its users now set a password to satisfy the ck_nulltest constraint that release/v1.2 still has, and the test for #9190 (owner treated as WRITE) is dropped because that fix is not on this branch.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine release/v1.2 back porting to release/v1.2 release/v1.3 back porting to release/v1.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants