Skip to content

test(amber): add unit test coverage for FriesReconfigurationAlgorithm - #7578

Merged
aglinxinyuan merged 2 commits into
apache:mainfrom
eugenegujing:test/fries-reconfiguration-algorithm
Aug 13, 2026
Merged

test(amber): add unit test coverage for FriesReconfigurationAlgorithm#7578
aglinxinyuan merged 2 commits into
apache:mainfrom
eugenegujing:test/fries-reconfiguration-algorithm

Conversation

@eugenegujing

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

The new FriesReconfigurationAlgorithmSpec (16 tests) pins the algorithm's observable behaviors through getReconfigurations, with positive and negative assertions:

  • scope stays limited to the reconfigured operator when no one-to-many operator is upstream;
  • an upstream one-to-many operator with a reconfigured descendant is pulled into the scope together with the connecting path, and becomes the epoch-marker source;
  • one-to-many operators with no reconfigured descendant, one-to-many operators downstream of the target, and side branches are all excluded;
  • parallel branches between a one-to-many operator and the target are all included (diamond);
  • disconnected closures split into separate components with per-component reconfiguration sets and sources, while connected reconfigured operators merge into one component;
  • multiple one-to-many operators converging on the target yield a single component with multiple marker sources;
  • links are traversed on every input port, not just port 0;
  • edge cases: single-operator region, target that is itself a region source, target that is itself one-to-many, multiple executing regions handled independently, and an empty result when no region contains a target.

Fixtures build small regions with PhysicalOp/PhysicalLink wiring (the closure walks per-operator port links) and stub WorkflowExecutionManager.getExecutingRegions, following the patterns of RegionSpec and WorkflowExecutionManagerSpec. No production code is changed.

Any related issues, documentation, discussions?

Closes #7573

How was this PR tested?

This PR is itself test-only. The new spec was run with:

sbt "WorkflowExecutionService/testOnly *FriesReconfigurationAlgorithmSpec"

All 16 tests pass. The suite was additionally mutation-checked: four manual mutations of the algorithm (dropping forward-closure propagation, disabling the connected-component split, disabling the one-to-many pull-in, and returning whole components instead of intersecting with the source set) each caused multiple test failures, and the source was restored afterwards. scalafmtCheck passes.

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

Co-authored by: Claude Code (Claude Fable 5)

Add FriesReconfigurationAlgorithmSpec covering closure computation around one-to-many operators, connected-component splitting, epoch-marker source selection, and multi-region handling.
@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.

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

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

Compared against main e878df3 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 363 0.221 26,002/37,967/37,967 us 🔴 +13.8% / 🔴 +137.4%
🔴 bs=100 sw=10 sl=64 765 0.467 125,860/174,169/174,169 us 🔴 +24.8% / 🔴 +61.2%
bs=1000 sw=10 sl=64 914 0.558 1,094,344/1,157,512/1,157,512 us ⚪ within ±5% / 🔴 +11.5%
Baseline details

Latest main e878df3 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 363 tuples/sec 404 tuples/sec 784.3 tuples/sec -10.1% -53.7%
bs=10 sw=10 sl=64 MB/s 0.221 MB/s 0.247 MB/s 0.479 MB/s -10.5% -53.8%
bs=10 sw=10 sl=64 p50 26,002 us 22,844 us 12,590 us +13.8% +106.5%
bs=10 sw=10 sl=64 p95 37,967 us 33,720 us 15,991 us +12.6% +137.4%
bs=10 sw=10 sl=64 p99 37,967 us 33,720 us 18,694 us +12.6% +103.1%
bs=100 sw=10 sl=64 throughput 765 tuples/sec 818 tuples/sec 1,002 tuples/sec -6.5% -23.7%
bs=100 sw=10 sl=64 MB/s 0.467 MB/s 0.499 MB/s 0.612 MB/s -6.4% -23.6%
bs=100 sw=10 sl=64 p50 125,860 us 120,327 us 101,285 us +4.6% +24.3%
bs=100 sw=10 sl=64 p95 174,169 us 139,603 us 108,068 us +24.8% +61.2%
bs=100 sw=10 sl=64 p99 174,169 us 139,603 us 118,235 us +24.8% +47.3%
bs=1000 sw=10 sl=64 throughput 914 tuples/sec 918 tuples/sec 1,030 tuples/sec -0.4% -11.3%
bs=1000 sw=10 sl=64 MB/s 0.558 MB/s 0.56 MB/s 0.629 MB/s -0.4% -11.2%
bs=1000 sw=10 sl=64 p50 1,094,344 us 1,087,270 us 991,882 us +0.7% +10.3%
bs=1000 sw=10 sl=64 p95 1,157,512 us 1,140,726 us 1,038,496 us +1.5% +11.5%
bs=1000 sw=10 sl=64 p99 1,157,512 us 1,140,726 us 1,068,265 us +1.5% +8.4%
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,551.38,200,128000,363,0.221,26001.67,37966.62,37966.62
1,100,10,64,20,2613.17,2000,1280000,765,0.467,125860.43,174169.09,174169.09
2,1000,10,64,20,21878.04,20000,12800000,914,0.558,1094344.22,1157512.10,1157512.10

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.87%. Comparing base (e878df3) to head (b8baf7d).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7578      +/-   ##
============================================
- Coverage     87.88%   87.87%   -0.02%     
+ Complexity     4276     4271       -5     
============================================
  Files          1176     1176              
  Lines         47018    47018              
  Branches       5245     5245              
============================================
- Hits          41323    41317       -6     
  Misses         3972     3972              
- Partials       1723     1729       +6     
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø) Carriedforward from e878df3
agent-service 98.62% <ø> (ø) Carriedforward from e878df3
amber 82.84% <ø> (-0.04%) ⬇️
computing-unit-managing-service 60.38% <ø> (ø) Carriedforward from e878df3
config-service 65.97% <ø> (ø) Carriedforward from e878df3
file-service 69.05% <ø> (ø) Carriedforward from e878df3
frontend 89.94% <ø> (ø) Carriedforward from e878df3
notebook-migration-service 78.89% <ø> (ø) Carriedforward from e878df3
pyamber 97.52% <ø> (ø) Carriedforward from e878df3
workflow-compiling-service 26.31% <ø> (ø) Carriedforward from e878df3

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

@eugenegujing

Copy link
Copy Markdown
Contributor Author

/request-review @aglinxinyuan

@github-actions
github-actions Bot requested a review from aglinxinyuan August 13, 2026 03:54
@aglinxinyuan
aglinxinyuan added this pull request to the merge queue Aug 13, 2026
Merged via the queue into apache:main with commit 81299d1 Aug 13, 2026
21 checks passed
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 unit test coverage for FriesReconfigurationAlgorithm

3 participants