fix(scripts): dev_packs.py makes a folder only when it isn't there, for the Windows farm sandbox #948
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!948
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/dev-packs-sandbox-dirs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type: fix · Risk: low · Tested on: Linux (game-free checks) · Needs: Windows, any GPU (a Beanstalk Windows agent)
Why
Every Test Farm job on a Windows tester fails before it builds anything.
scripts/dev_packs.py basestops withPermissionError: [WinError 5] Access is denied: 'C:\\'(reportrp_069212220b5ebc8f, PR #910, RTX 4070, Windows 11).
On Windows, the Beanstalk agent runs Longshot's scripts in an AppContainer sandbox. The sandbox can open the folders it
was given, but it can't see the folders above them.
os.makedirs(d, exist_ok=True)looks at every folder abovedbefore making anything, even when
dis already there. Inside the sandbox each of those folders looks missing, so itclimbs to
C:\and fails there, andexist_okdoesn't cover that error. The agent makes the base folder before itstarts
dev_packs.py, so the folder is there; only the check above it fails.How to reproduce
Seen on: Windows 11, Beanstalk agent nightly-30-2e88da66 (AppContainer sandbox), any GPU
Settings and switches: defaults
Steps: let a Windows Beanstalk agent take any farm job; it runs
dev_packs.py base <data>\bases\main ...in the sandboxExpected: the base is built
Actual:
Busy.__enter__→os.makedirs→PermissionError: [WinError 5] Access is denied: 'C:\\'What changed
dev_packs.pymakes a folder only when it isn't already there, so a folder the sandbox was given is never checkedfrom above.
scripts/dev_packs.py: newensure_dir(), which callsos.makedirsonly when the folder isn't a directory yet. It isused for the busy marker's folder (
Busy.__enter__, the base's own folder) and foradopt's base folder. Theother
makedirscalls make folders inside a base or job folder, whose parent is visible, so they're unchanged.tests/test_dev_packs.py:test_busy_folders_above_hiddenfakes the sandbox: folders above the base look missing,and making one is refused. Taking and leaving the busy marker, and making a folder inside the base, still work.
Measurements
Nothing to measure: a script fix with a game-free test, which fails on
mainwith the samePermissionError: Access is denied: '/'(/standing in forC:\) and passes here.Flags and settings
None
Testing
Tested:
python -I -B tests/test_dev_packs.pypasses on Linux. Withmain'sdev_packs.pythe new test fails as on thetester's PC.
python -I -B tests/run_all.py: 548 passed, 17 failed, 76 skipped on Linux. The same 17 also fail onmainwithout this change:test_appimage_player_build.py,test_bake_portability.py,test_crash_dialog.py,test_crt_options.py,test_env_on.py,test_lift_cleanup_error.py,test_linux_preflight.py,test_linux_update.py,test_make_game_cache.py,test_missing_nup.py,test_mods_size_table.py,test_options_budget_once.py,test_pipeline_tour.py,test_readback_late.py,test_vk_occlusion_queries.py,test_vk_pgo.py,test_walk_key.py.Not tested: a real Windows agent run. I'm on Linux, and the AppContainer only exists on Windows.
Must be tested:
expecting no
Access is denied: 'C:\\'in the report (Test Farm:@Beanstalk windowson any PR). It can't beseen on this PR first: the agent builds the main base with
main's owndev_packs.py, which still has the bug.Risks
What could break: nothing outside the sandbox. A folder that isn't there yet is made as before. A folder that is
there is now left alone instead of being checked from above.
Turning it off: revert the commit
Compatibility: Nothing changes
Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.mainand passing here.tests/that reads changed source updated in this PR, not weakened.Testing: a farm run can only show the fix after merge, because the agent builds the main base with main's dev_packs.py. The description now says so.
WIP: fix(scripts): dev_packs.py makes a folder only when it isn't there, for the Windows farm sandboxto fix(scripts): dev_packs.py makes a folder only when it isn't there, for the Windows farm sandbox