Skip to content

test(amber): remove the duplicate local-file document spec - #9735

Open
aglinxinyuan wants to merge 1 commit into
apache:mainfrom
aglinxinyuan:test/duplicate-local-file-document-spec
Open

aglinxinyuan wants to merge 1 commit into
apache:mainfrom
aglinxinyuan:test/duplicate-local-file-document-spec

Conversation

@aglinxinyuan

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Remove Amber's ReadonlyLocalFileDocumentSpec (+0/−111 lines). Every check it makes is already made in Workflow Core, so no coverage is lost, and there is no behaviour change:

  • getURI, asFile and reading through asInputStream: Core's ReadonlyLocalFileDocumentSpec checks all three.
  • getItem, get, getRange, getAfter and getCount throwing NotImplementedError: Core's suite matches their exact messages, where this suite matches substrings.
  • Opening the document through DocumentFactory.openReadonlyDocument: DocumentFactorySpec checks that the file scheme returns a ReadonlyLocalFileDocument with the file's URI.
Event PR / Commit
Introduced by #2978 (2024-10-28)
Duplicated by #6095 (2026-07-04), which added the Core suite

As of 2026-11-27, it has duplicated the Core suite for almost five months.

Any related issues, documentation, discussions?

Closes #9734.

How was this PR tested?

Ran on this branch and on main at e8c37e625a (Windows 11, JDK 17):

sbt "WorkflowExecutionService/testOnly org.apache.texera.amber.engine.common.storage.ReadonlyLocalFileDocumentSpec"  # main only
sbt "WorkflowExecutionService/Test/compile" "WorkflowCore/testOnly org.apache.texera.amber.core.storage.model.ReadonlyLocalFileDocumentSpec org.apache.texera.amber.core.storage.DocumentFactorySpec"
  • Main: the Amber suite passes its 8 tests.
  • Both sides: the two Core suites pass the same 24 tests, and Amber's tests compile without the suite.
  • Controls: four breaks fail exactly the four Core cases that cover them, and the other 20 pass: an empty asInputStream, another asFile path and another getCount message in ReadonlyLocalFileDocument, and another URI from the factory's file branch. On main, the same breaks fail the four matching cases of this suite, so it catches nothing the Core suites miss.

To re-check, this returns no hits on this branch:

git grep -n "ReadonlyLocalFileDocumentSpec" -- amber

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

Generated-by: Claude Code (Claude Opus 5.5)

Workflow Core's ReadonlyLocalFileDocumentSpec, added by apache#6095, makes every
assertion this Amber suite makes: the URI, the backing file, reading
through an input stream, and the five unsupported accessors, with exact
messages instead of substrings. DocumentFactorySpec covers the factory's
file-scheme dispatch that this suite went through.
@aglinxinyuan
aglinxinyuan requested review from kunwp1 and a balanced review from Copilot November 27, 2026 22:34

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@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

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

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

Compared against main e8c37e6 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 681 0.416 13,997/19,904/19,904 us 🔴 +10.2% / 🔴 +46.7%
⚪ bs=100 sw=10 sl=64 1,393 0.85 71,995/80,632/80,632 us ⚪ within ±5% / 🟢 -22.5%
⚪ bs=1000 sw=10 sl=64 1,510 0.922 667,167/705,973/705,973 us ⚪ within ±5% / 🟢 -22.4%
Baseline details

Latest main e8c37e6 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 681 tuples/sec 706 tuples/sec 951.49 tuples/sec -3.5% -28.4%
bs=10 sw=10 sl=64 MB/s 0.416 MB/s 0.431 MB/s 0.581 MB/s -3.5% -28.4%
bs=10 sw=10 sl=64 p50 13,997 us 12,700 us 10,659 us +10.2% +31.3%
bs=10 sw=10 sl=64 p95 19,904 us 20,397 us 13,570 us -2.4% +46.7%
bs=10 sw=10 sl=64 p99 19,904 us 20,397 us 16,744 us -2.4% +18.9%
bs=100 sw=10 sl=64 throughput 1,393 tuples/sec 1,391 tuples/sec 1,256 tuples/sec +0.1% +10.9%
bs=100 sw=10 sl=64 MB/s 0.85 MB/s 0.849 MB/s 0.767 MB/s +0.1% +10.9%
bs=100 sw=10 sl=64 p50 71,995 us 71,650 us 84,170 us +0.5% -14.5%
bs=100 sw=10 sl=64 p95 80,632 us 78,775 us 91,401 us +2.4% -11.8%
bs=100 sw=10 sl=64 p99 80,632 us 78,775 us 104,021 us +2.4% -22.5%
bs=1000 sw=10 sl=64 throughput 1,510 tuples/sec 1,498 tuples/sec 1,299 tuples/sec +0.8% +16.2%
bs=1000 sw=10 sl=64 MB/s 0.922 MB/s 0.915 MB/s 0.793 MB/s +0.8% +16.3%
bs=1000 sw=10 sl=64 p50 667,167 us 669,657 us 819,011 us -0.4% -18.5%
bs=1000 sw=10 sl=64 p95 705,973 us 706,401 us 859,723 us -0.1% -17.9%
bs=1000 sw=10 sl=64 p99 705,973 us 706,401 us 909,957 us -0.1% -22.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,293.52,200,128000,681,0.416,13997.40,19904.17,19904.17
1,100,10,64,20,1436.04,2000,1280000,1393,0.850,71994.90,80631.81,80631.81
2,1000,10,64,20,13241.54,20000,12800000,1510,0.922,667167.10,705973.27,705973.27

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.77%. Comparing base (e8c37e6) to head (9bc99ba).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #9735   +/-   ##
=========================================
  Coverage     91.77%   91.77%           
  Complexity     5136     5136           
=========================================
  Files          1308     1308           
  Lines         58013    58013           
  Branches       7552     7552           
=========================================
  Hits          53240    53240           
  Misses         2887     2887           
  Partials       1886     1886           
Flag Coverage Δ *Carryforward flag
access-control-service 77.44% <ø> (ø) Carriedforward from e8c37e6
agent-service 99.56% <ø> (ø) Carriedforward from e8c37e6
amber 85.95% <ø> (ø)
computing-unit-managing-service 63.81% <ø> (ø) Carriedforward from e8c37e6
config-service 87.50% <ø> (ø) Carriedforward from e8c37e6
file-service 82.16% <ø> (ø) Carriedforward from e8c37e6
frontend 96.45% <ø> (ø) Carriedforward from e8c37e6
notebook-migration-service 83.84% <ø> (ø) Carriedforward from e8c37e6
pyamber 98.70% <ø> (ø) Carriedforward from e8c37e6
result-service 86.48% <ø> (ø) Carriedforward from e8c37e6
workflow-compiling-service 80.90% <ø> (ø) Carriedforward from e8c37e6

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

This branch has not been deployed

No deployments
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.

Remove the duplicate ReadonlyLocalFileDocument spec from Amber

3 participants