Skip to content

fix(test, amber): make PveResourceSpec pass on Windows - #9648

Open
eugenegujing wants to merge 1 commit into
apache:mainfrom
eugenegujing:fix/pve-resource-spec-windows
Open

eugenegujing wants to merge 1 commit into
apache:mainfrom
eugenegujing:fix/pve-resource-spec-windows

Conversation

@eugenegujing

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

PveResourceSpec fails 6 of its 52 tests on Windows. Its fake python -m venv runner always wrote <venv>/bin/python and <venv>/bin/pip, while PveManager.venvPython looks for <venv>/Scripts/python.exe on Windows, so every test that created a PVE through createNewPve ended at [PVE][ERR] Python executable not found for PVE.

Before (Windows):  fake venv writes bin/python       -> PveManager looks in Scripts/python.exe -> "not found", 6 tests fail
After  (Windows):  fake venv writes Scripts/python.exe -> PveManager finds it                  -> 0 tests fail
Linux / macOS:     fake venv writes bin/python, as before

The change is in the spec only:

Where Before After
New venvExecutable(venv, name) the platform rule lived only in pythonBinFor one helper holds it: bin/<name> on POSIX, Scripts/<name>.exe on Windows; pythonBinFor delegates to it
Fake venv runner wrote bin/python, bin/pip writes both through venvExecutable
"create a new PVE" assertions bin/python, bin/pip literals venvExecutable(pvePath, ...)
getPythonBin should return Some assertion endWith("<name>/pve/bin/python") endWith(testRoot.relativize(pythonBinFor(name)).toString), the same string on POSIX

Two comments that described the fake as POSIX-only are updated to match. Nothing under src/main changes, and on POSIX the spec writes the same files and asserts the same strings as before.

Any related issues, documentation, discussions?

Closes #9647

The test notes of #7800, #7847, #7852 and #8036 mention these six failures as pre-existing on Windows.

How was this PR tested?

On Windows 11:

sbt "WorkflowExecutionService/testOnly org.apache.texera.web.resource.pythonvirtualenvironment.PveResourceSpec"
succeeded failed canceled
main 45 6 1
this PR 51 0 1

The canceled test is PveManager.getPythonBin should return nothing when the interpreter exists but is not executable: its own assume cancels it because Windows cannot clear the executable bit, before and after this change.

sbt scalafmtCheckAll
sbt "scalafixAll --check"

Both pass. The spec was not run on Linux locally; CI covers that.

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

Yes. Generated-by: Claude Code (claude-fable-5-2). Co-authored with Claude; the author reviewed the change before submission.

The fake `python -m venv` runner writes python and pip where the platform's venv keeps them (`bin/` on POSIX, `Scripts/*.exe` on Windows) through one `venvExecutable` helper, and the two assertions that hard-coded the POSIX layout use the same helper.
@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: @aglinxinyuan
    You can notify them by mentioning @aglinxinyuan in a comment.

@Yicong-Huang Yicong-Huang added release/v1.3 back porting to release/v1.3 release/v1.2 back porting to release/v1.2 labels Nov 23, 2026
@github-actions
github-actions Bot requested review from mengw15 and xuang7 November 23, 2026 17:07
@github-actions

Copy link
Copy Markdown
Contributor

Backport auto-label report

This fix: PR was checked against each actively-supported release branch. A release/* label nominates a backport target; the branch's release manager approving this PR is what sends the fix there. The required Backport Approvals check stays red until every label below is approved, so each manager either approves or removes their own label — which is why the labels left on a merged PR are exactly the branches it reached.

Release branch Analysis
✅ release/v1.3 Change detected on this branch — label added; this fix is queued to backport here. @mengw15 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other. Review requested.
✅ release/v1.2 Change detected on this branch — label added; this fix is queued to backport here. @xuang7 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other. Review requested.

Auto-label run.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

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

Compared against main 6a16e1a 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 404 0.246 22,595/37,336/37,336 us 🟢 -35.9% / 🔴 +178.8%
🟢 bs=100 sw=10 sl=64 980 0.598 102,699/113,681/113,681 us 🟢 -12.5% / 🔴 +31.7%
🔴 bs=1000 sw=10 sl=64 1,085 0.662 917,489/1,089,992/1,089,992 us 🔴 +12.0% / 🔴 +33.8%
Baseline details

Latest main 6a16e1a from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 404 tuples/sec 410 tuples/sec 993.83 tuples/sec -1.5% -59.3%
bs=10 sw=10 sl=64 MB/s 0.246 MB/s 0.25 MB/s 0.607 MB/s -1.6% -59.4%
bs=10 sw=10 sl=64 p50 22,595 us 22,280 us 10,119 us +1.4% +123.3%
bs=10 sw=10 sl=64 p95 37,336 us 58,278 us 13,394 us -35.9% +178.8%
bs=10 sw=10 sl=64 p99 37,336 us 58,278 us 16,114 us -35.9% +131.7%
bs=100 sw=10 sl=64 throughput 980 tuples/sec 1,002 tuples/sec 1,327 tuples/sec -2.2% -26.2%
bs=100 sw=10 sl=64 MB/s 0.598 MB/s 0.611 MB/s 0.81 MB/s -2.1% -26.2%
bs=100 sw=10 sl=64 p50 102,699 us 99,447 us 79,097 us +3.3% +29.8%
bs=100 sw=10 sl=64 p95 113,681 us 129,944 us 86,335 us -12.5% +31.7%
bs=100 sw=10 sl=64 p99 113,681 us 129,944 us 94,338 us -12.5% +20.5%
bs=1000 sw=10 sl=64 throughput 1,085 tuples/sec 1,114 tuples/sec 1,363 tuples/sec -2.6% -20.4%
bs=1000 sw=10 sl=64 MB/s 0.662 MB/s 0.68 MB/s 0.832 MB/s -2.6% -20.4%
bs=1000 sw=10 sl=64 p50 917,489 us 896,812 us 774,633 us +2.3% +18.4%
bs=1000 sw=10 sl=64 p95 1,089,992 us 972,868 us 814,584 us +12.0% +33.8%
bs=1000 sw=10 sl=64 p99 1,089,992 us 972,868 us 858,914 us +12.0% +26.9%
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,495.32,200,128000,404,0.246,22594.79,37335.76,37335.76
1,100,10,64,20,2041.39,2000,1280000,980,0.598,102699.05,113681.33,113681.33
2,1000,10,64,20,18431.07,20000,12800000,1085,0.662,917489.46,1089992.07,1089992.07

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.68%. Comparing base (95e2748) to head (b1c3820).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #9648   +/-   ##
=========================================
  Coverage     91.67%   91.68%           
- Complexity     5135     5136    +1     
=========================================
  Files          1304     1304           
  Lines         58088    58088           
  Branches       7582     7582           
=========================================
+ Hits          53254    53256    +2     
+ Misses         2922     2921    -1     
+ Partials       1912     1911    -1     
Flag Coverage Δ *Carryforward flag
access-control-service 77.44% <ø> (ø) Carriedforward from 95e2748
agent-service 99.56% <ø> (ø) Carriedforward from 95e2748
amber 85.77% <ø> (+<0.01%) ⬆️
computing-unit-managing-service 63.83% <ø> (ø) Carriedforward from 95e2748
config-service 87.50% <ø> (ø) Carriedforward from 95e2748
file-service 82.16% <ø> (ø) Carriedforward from 95e2748
frontend 96.45% <ø> (ø) Carriedforward from 95e2748
notebook-migration-service 83.77% <ø> (ø) Carriedforward from 95e2748
pyamber 98.38% <ø> (ø) Carriedforward from 95e2748
result-service 85.71% <ø> (ø) Carriedforward from 95e2748
workflow-compiling-service 78.30% <ø> (ø) Carriedforward from 95e2748

*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

engine fix release/v1.2 back porting to release/v1.2 release/v1.3 back porting to release/v1.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PveResourceSpec fails six tests on Windows because its fake venv is always laid out the POSIX way

3 participants