Skip to content

test(workflow-core): extend small-class coverage and add LargeBinary/OnIceberg specs - #7025

Open
aglinxinyuan wants to merge 1 commit into
apache:mainfrom
aglinxinyuan:test-wfcore-small-cov
Open

test(workflow-core): extend small-class coverage and add LargeBinary/OnIceberg specs#7025
aglinxinyuan wants to merge 1 commit into
apache:mainfrom
aglinxinyuan:test-wfcore-small-cov

Conversation

@aglinxinyuan

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Adds 42 tests across five common/workflow-core classes (49 -> 91 in these suites). No source changes; the three extended specs are pure insertions.

  • PartitionInfo: satisfies/merge sensitivity to hash-attribute contents and order, RangePartition's always-Unknown merge override and the companion's collapse to UnknownPartition on an empty attribute list, plus the polymorphic-JSON contract (each subtype tagged with its registered type id, base-type round-trip preserving range bounds).
  • JGitVersionControl: initRepo's branch extraction matching what JGit reports, getRootFileNodeOfCommit on an empty tree and on depth-two nested directories, symbolic refs (HEAD) on both read paths, per-commit content after re-staging a modified file, binary-safe copies through both stream APIs, and a staged deletion reported as uncommitted until committed.
  • Tuple: constructor null guards, positional getField and its out-of-range failure, inMemSize growth, and the Builder's missing-attribute / duplicate-add / addSequentially size-mismatch paths.
  • LargeBinary (new spec): URI validation with exact messages (including the case-sensitive s3:// guard), bucket/object-key parsing with the empty-path branch, value semantics, the thread-local base-URI constructor and its unset failure, and Jackson @JsonValue/@JsonCreator behavior.
  • OnIceberg (new spec): expireSnapshots collapsing three snapshots to one while keeping every live row, idempotence, a no-op on a snapshot-less table, and the NoSuchTableException message — driven against a local Hadoop catalog on a temp file:/ warehouse, so no REST/S3 backend is needed.

A few defensive branches were left uncovered rather than contrived (unreachable return null guards in initRepo, and a parent-node creation branch the tree walk can't reach); they're listed in the review notes.

Any related issues, documentation, discussions?

Closes #7023.

How was this PR tested?

sbt -java-home <jbr-17> "WorkflowCore/testOnly *PartitionInfoSpec *JGitVersionControlSpec *TupleSpec *LargeBinarySpec *OnIcebergSpec" -> 91 succeeded, 0 failed. Test/scalafmtCheck + Test/scalafix --check clean.

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

Generated-by: Claude Code (Opus 4.8 [1M context])

…OnIceberg specs

Add 42 tests across five classes (no source changes; extends are insertions only):
- PartitionInfo: hash-attribute content/order sensitivity in satisfies/merge, the
  RangePartition always-Unknown merge and companion collapse to UnknownPartition,
  and the polymorphic JSON contract (type-id tagging + base-type round-trip).
- JGitVersionControl: initRepo branch extraction, empty-tree and nested-directory
  node building, symbolic refs, per-commit content history, binary-safe copies,
  and staged deletions reported as uncommitted.
- Tuple: constructor null guards, positional access, inMemSize growth, and the
  Builder's missing/duplicate/size-mismatch error paths.
- LargeBinary (new spec): URI validation with exact messages, bucket/object-key
  parsing incl. the empty-path branch, value semantics, the thread-local base-URI
  constructor, and Jackson @JsonValue/@JsonCreator behavior.
- OnIceberg (new spec): expireSnapshots collapsing snapshots while retaining live
  rows, idempotence, the snapshot-less no-op, and the missing-table error — driven
  against a local Hadoop catalog on a temp warehouse (no REST/S3 needed).
@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:

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

@codecov-commenter

codecov-commenter commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.20%. Comparing base (a61702f) to head (0213c75).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #7025   +/-   ##
=========================================
  Coverage     79.20%   79.20%           
  Complexity     3786     3786           
=========================================
  Files          1160     1160           
  Lines         46118    46118           
  Branches       5114     5114           
=========================================
  Hits          36529    36529           
  Misses         7969     7969           
  Partials       1620     1620           
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø)
agent-service 76.76% <ø> (ø) Carriedforward from a61702f
amber 72.43% <ø> (ø) Carriedforward from a61702f
computing-unit-managing-service 20.49% <ø> (ø)
config-service 66.66% <ø> (ø)
file-service 67.21% <ø> (ø) Carriedforward from a61702f
frontend 83.08% <ø> (ø) Carriedforward from a61702f
notebook-migration-service 78.94% <ø> (ø)
pyamber 96.34% <ø> (ø) Carriedforward from a61702f
workflow-compiling-service 26.31% <ø> (ø) Carriedforward from a61702f

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

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

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

Compared against main a61702f 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 390 0.238 23,670/39,423/39,423 us 🔴 +14.3% / 🔴 +149.5%
🟢 bs=100 sw=10 sl=64 792 0.483 124,165/150,169/150,169 us 🟢 -7.5% / 🔴 +39.9%
🔴 bs=1000 sw=10 sl=64 919 0.561 1,085,101/1,166,741/1,166,741 us 🔴 +5.8% / 🔴 +13.5%
Baseline details

Latest main a61702f from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 390 tuples/sec 428 tuples/sec 787.55 tuples/sec -8.9% -50.5%
bs=10 sw=10 sl=64 MB/s 0.238 MB/s 0.261 MB/s 0.481 MB/s -8.8% -50.5%
bs=10 sw=10 sl=64 p50 23,670 us 22,743 us 12,255 us +4.1% +93.1%
bs=10 sw=10 sl=64 p95 39,423 us 34,497 us 15,802 us +14.3% +149.5%
bs=10 sw=10 sl=64 p99 39,423 us 34,497 us 19,008 us +14.3% +107.4%
bs=100 sw=10 sl=64 throughput 792 tuples/sec 811 tuples/sec 997.81 tuples/sec -2.3% -20.6%
bs=100 sw=10 sl=64 MB/s 0.483 MB/s 0.495 MB/s 0.609 MB/s -2.4% -20.7%
bs=100 sw=10 sl=64 p50 124,165 us 118,622 us 100,690 us +4.7% +23.3%
bs=100 sw=10 sl=64 p95 150,169 us 162,357 us 107,316 us -7.5% +39.9%
bs=100 sw=10 sl=64 p99 150,169 us 162,357 us 113,823 us -7.5% +31.9%
bs=1000 sw=10 sl=64 throughput 919 tuples/sec 938 tuples/sec 1,030 tuples/sec -2.0% -10.8%
bs=1000 sw=10 sl=64 MB/s 0.561 MB/s 0.572 MB/s 0.629 MB/s -1.9% -10.8%
bs=1000 sw=10 sl=64 p50 1,085,101 us 1,063,723 us 981,213 us +2.0% +10.6%
bs=1000 sw=10 sl=64 p95 1,166,741 us 1,102,312 us 1,027,605 us +5.8% +13.5%
bs=1000 sw=10 sl=64 p99 1,166,741 us 1,102,312 us 1,055,466 us +5.8% +10.5%
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,512.53,200,128000,390,0.238,23669.63,39423.39,39423.39
1,100,10,64,20,2525.76,2000,1280000,792,0.483,124165.18,150169.07,150169.07
2,1000,10,64,20,21768.11,20000,12800000,919,0.561,1085100.67,1166741.19,1166741.19

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.

Extend workflow-core small-class unit test coverage

2 participants