Skip to content

feat(workflow-operator): read the generated module as UTF-8 in three test drivers - #8988

Merged
aglinxinyuan merged 1 commit into
apache:mainfrom
kz930:feat/8976-utf8-test-drivers
Oct 24, 2026
Merged

aglinxinyuan merged 1 commit into
apache:mainfrom
kz930:feat/8976-utf8-test-drivers

Conversation

@kz930

@kz930 kz930 commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

The Python drivers in MachineLearningScorerOpDescSpec, FilledAreaPlotOpDescSpec and TreePlotOpDescSpec opened the generated module without an encoding, so Python decoded it with the locale's, which is cp1252 on Windows. The spec writes it as UTF-8. Each driver now passes encoding="utf-8", as the drivers that read Plotly HTML already do.

Any related issues, documentation, discussions?

Closes #8976

How was this PR tested?

The three specs pass locally (51 tests). The generated modules are ASCII today, so the change only matters once one is not.

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

Generated-by: Claude Code (Claude Opus 5.5)

🤖 Generated with Claude Code

…drivers

The spec writes the module as UTF-8, and open() without an encoding decodes
it with the locale's, which is cp1252 on Windows.

Closes apache#8976

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@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: @eugenegujing
    You can notify them by mentioning @eugenegujing in a comment.

@github-actions

Copy link
Copy Markdown
Contributor

Linked issue already claimed

This PR closes an issue that someone else has already claimed:

Issue Claimed by Their open PR
#8976 @Matthew-DWM (assignee) —

Please check with them before this merges. Merging closes the issue, and any work they have in progress is left with nothing to fix.

  • If this PR takes over, say so here. Credit any of their work it includes, for example with a Co-authored-by: trailer.
  • If their claim is stale, they can release it with /untake, or a maintainer can unassign them.
  • Otherwise, remove that issue's closing keyword from this PR's description.

Refreshed whenever this PR is edited; deleted once nothing here applies.

@codecov-commenter

codecov-commenter commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.61%. Comparing base (6a29c59) to head (53a273e).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8988      +/-   ##
============================================
- Coverage     92.61%   92.61%   -0.01%     
+ Complexity     5059     5058       -1     
============================================
  Files          1258     1258              
  Lines         53780    53780              
  Branches       6707     6707              
============================================
- Hits          49811    49809       -2     
- Misses         2313     2314       +1     
- Partials       1656     1657       +1     
Flag Coverage Δ *Carryforward flag
access-control-service 77.38% <ø> (ø)
agent-service 99.16% <ø> (ø) Carriedforward from 6a29c59
amber 88.09% <ø> (-0.02%) ⬇️
computing-unit-managing-service 60.48% <ø> (ø)
config-service 87.37% <ø> (ø)
file-service 82.00% <ø> (ø)
frontend 96.59% <ø> (ø) Carriedforward from 6a29c59
notebook-migration-service 83.73% <ø> (ø)
pyamber 98.58% <ø> (ø) Carriedforward from 6a29c59
workflow-compiling-service 72.43% <ø> (ø)

*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

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

Compared against main 6a29c59 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 372 0.227 26,487/32,889/32,889 us 🔴 +14.7% / 🔴 +118.4%
🟢 bs=100 sw=10 sl=64 780 0.476 126,351/144,256/144,256 us 🟢 -10.0% / 🔴 +38.5%
🔴 bs=1000 sw=10 sl=64 910 0.556 1,099,987/1,181,077/1,181,077 us 🔴 +5.9% / 🔴 +19.9%
Baseline details

Latest main 6a29c59 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 372 tuples/sec 416 tuples/sec 822.11 tuples/sec -10.6% -54.8%
bs=10 sw=10 sl=64 MB/s 0.227 MB/s 0.254 MB/s 0.502 MB/s -10.6% -54.8%
bs=10 sw=10 sl=64 p50 26,487 us 23,097 us 12,129 us +14.7% +118.4%
bs=10 sw=10 sl=64 p95 32,889 us 36,357 us 15,469 us -9.5% +112.6%
bs=10 sw=10 sl=64 p99 32,889 us 36,357 us 18,357 us -9.5% +79.2%
bs=100 sw=10 sl=64 throughput 780 tuples/sec 804 tuples/sec 1,058 tuples/sec -3.0% -26.3%
bs=100 sw=10 sl=64 MB/s 0.476 MB/s 0.491 MB/s 0.646 MB/s -3.1% -26.3%
bs=100 sw=10 sl=64 p50 126,351 us 122,623 us 97,399 us +3.0% +29.7%
bs=100 sw=10 sl=64 p95 144,256 us 160,241 us 104,184 us -10.0% +38.5%
bs=100 sw=10 sl=64 p99 144,256 us 160,241 us 117,615 us -10.0% +22.7%
bs=1000 sw=10 sl=64 throughput 910 tuples/sec 932 tuples/sec 1,099 tuples/sec -2.4% -17.2%
bs=1000 sw=10 sl=64 MB/s 0.556 MB/s 0.569 MB/s 0.671 MB/s -2.3% -17.1%
bs=1000 sw=10 sl=64 p50 1,099,987 us 1,070,663 us 946,743 us +2.7% +16.2%
bs=1000 sw=10 sl=64 p95 1,181,077 us 1,115,452 us 985,437 us +5.9% +19.9%
bs=1000 sw=10 sl=64 p99 1,181,077 us 1,115,452 us 1,012,622 us +5.9% +16.6%
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,537.64,200,128000,372,0.227,26486.87,32888.69,32888.69
1,100,10,64,20,2564.22,2000,1280000,780,0.476,126350.85,144256.30,144256.30
2,1000,10,64,20,21973.02,20000,12800000,910,0.556,1099986.52,1181076.82,1181076.82

@kz930

kz930 commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

@carloea2 Could you review this? The three test drivers left out of the earlier UTF-8 fix now read the generated module with encoding="utf-8".

@carloea2 carloea2 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.

Verified the three encoding changes against current upstream main on Windows. All 51 tests in the three affected specs and scalafmtCheckAll pass. CI is green.

Command: sbt -batch "WorkflowOperator/testOnly *MachineLearningScorerOpDescSpec *FilledAreaPlotOpDescSpec *TreePlotOpDescSpec" scalafmtCheckAll

@aglinxinyuan aglinxinyuan 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 Oct 24, 2026
Merged via the queue into apache:main with commit d1d2885 Oct 24, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Read the generated module as UTF-8 in three Python test drivers

4 participants