Skip to content

test(amber): cover computing unit worker args - #7192

Merged
aglinxinyuan merged 2 commits into
apache:mainfrom
aglinxinyuan:test/computing-unit-worker
Aug 1, 2026
Merged

test(amber): cover computing unit worker args#7192
aglinxinyuan merged 2 commits into
apache:mainfrom
aglinxinyuan:test/computing-unit-worker

Conversation

@aglinxinyuan

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Adds focused unit coverage for computing-unit worker command-line parsing, including empty input, repeated addresses, and malformed options.

Any related issues, documentation, discussions?

Closes #7189

How was this PR tested?

  • WorkflowExecutionService/testOnly org.apache.texera.web.ComputingUnitWorkerSpec — 5 passed.
  • WorkflowExecutionService/Test/scalafmtAll and WorkflowExecutionService/Test/scalafix
  • WorkflowExecutionService/Test/scalafmtCheck and WorkflowExecutionService/Test/scalafix --check

Mutation proof (each production change was reverted):

Production mutation Focused test result
Renamed the recognized --serverAddr option 2 failed
Changed the parsed option key 2 failed
Skipped malformed-option rejection 2 failed

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

Generated-by: Codex (GPT-5)

@github-actions

Copy link
Copy Markdown
Contributor

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.

@aglinxinyuan
aglinxinyuan requested a review from mengw15 July 31, 2026 23:56
@aglinxinyuan
aglinxinyuan marked this pull request as ready for review July 31, 2026 23:56
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

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

Compared against main 2388b85 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 396 0.242 26,917/34,531/34,531 us 🔴 +13.1% / 🔴 +113.2%
bs=100 sw=10 sl=64 818 0.499 118,250/155,931/155,931 us ⚪ within ±5% / 🔴 +40.8%
bs=1000 sw=10 sl=64 955 0.583 1,045,835/1,083,018/1,083,018 us ⚪ within ±5% / ⚪ within ±5%
Baseline details

Latest main 2388b85 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 396 tuples/sec 418 tuples/sec 765.25 tuples/sec -5.3% -48.3%
bs=10 sw=10 sl=64 MB/s 0.242 MB/s 0.255 MB/s 0.467 MB/s -5.1% -48.2%
bs=10 sw=10 sl=64 p50 26,917 us 23,796 us 12,703 us +13.1% +111.9%
bs=10 sw=10 sl=64 p95 34,531 us 30,968 us 16,199 us +11.5% +113.2%
bs=10 sw=10 sl=64 p99 34,531 us 30,968 us 19,557 us +11.5% +76.6%
bs=100 sw=10 sl=64 throughput 818 tuples/sec 809 tuples/sec 965.22 tuples/sec +1.1% -15.3%
bs=100 sw=10 sl=64 MB/s 0.499 MB/s 0.494 MB/s 0.589 MB/s +1.0% -15.3%
bs=100 sw=10 sl=64 p50 118,250 us 118,410 us 103,830 us -0.1% +13.9%
bs=100 sw=10 sl=64 p95 155,931 us 161,337 us 110,778 us -3.4% +40.8%
bs=100 sw=10 sl=64 p99 155,931 us 161,337 us 118,713 us -3.4% +31.4%
bs=1000 sw=10 sl=64 throughput 955 tuples/sec 936 tuples/sec 992.33 tuples/sec +2.0% -3.8%
bs=1000 sw=10 sl=64 MB/s 0.583 MB/s 0.571 MB/s 0.606 MB/s +2.1% -3.7%
bs=1000 sw=10 sl=64 p50 1,045,835 us 1,073,343 us 1,016,959 us -2.6% +2.8%
bs=1000 sw=10 sl=64 p95 1,083,018 us 1,105,659 us 1,062,501 us -2.0% +1.9%
bs=1000 sw=10 sl=64 p99 1,083,018 us 1,105,659 us 1,082,611 us -2.0% +0.0%
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,505.23,200,128000,396,0.242,26917.17,34531.14,34531.14
1,100,10,64,20,2444.10,2000,1280000,818,0.499,118249.77,155931.37,155931.37
2,1000,10,64,20,20934.29,20000,12800000,955,0.583,1045834.91,1083018.41,1083018.41

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.

Pull request overview

Adds targeted ScalaTest coverage in the Amber/web layer for ComputingUnitWorker.parseArgs, validating expected option parsing and failure behavior for invalid inputs (empty args, repeated --serverAddr, unknown/malformed options). This supports the Amber computing-unit worker startup path by pinning current CLI parsing semantics.

Changes:

  • Add a new ComputingUnitWorkerSpec covering empty input and --serverAddr parsing.
  • Assert “last one wins” behavior for repeated --serverAddr.
  • Add negative tests for unknown options and missing option values (expecting InvalidArgumentException with the current message).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov-commenter

codecov-commenter commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.74%. Comparing base (2388b85) to head (ca65e1b).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7192      +/-   ##
============================================
+ Coverage     80.73%   80.74%   +0.01%     
+ Complexity     3925     3924       -1     
============================================
  Files          1162     1160       -2     
  Lines         46264    45934     -330     
  Branches       5153     5118      -35     
============================================
- Hits          37350    37089     -261     
+ Misses         7243     7180      -63     
+ Partials       1671     1665       -6     
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø) Carriedforward from ebfd1db
agent-service 77.42% <ø> (ø) Carriedforward from ebfd1db
amber 76.05% <ø> (+0.04%) ⬆️
computing-unit-managing-service 20.49% <ø> (ø) Carriedforward from ebfd1db
config-service 65.62% <ø> (-0.36%) ⬇️ Carriedforward from ebfd1db
file-service 66.59% <ø> (-0.22%) ⬇️ Carriedforward from ebfd1db
frontend 83.25% <ø> (+0.02%) ⬆️ Carriedforward from ebfd1db
notebook-migration-service 78.69% <ø> (-0.20%) ⬇️ Carriedforward from ebfd1db
pyamber 97.36% <ø> (-0.01%) ⬇️ Carriedforward from ebfd1db
workflow-compiling-service 26.31% <ø> (ø) Carriedforward from ebfd1db

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

@aglinxinyuan
aglinxinyuan added this pull request to the merge queue Aug 1, 2026
Merged via the queue into apache:main with commit 18ebb0d Aug 1, 2026
21 checks passed
@aglinxinyuan
aglinxinyuan deleted the test/computing-unit-worker branch August 1, 2026 06:40
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.

Add tests for computing unit worker argument parsing

4 participants