pipeline: remove staging files when cache publication fails #161
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!161
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/161/head"
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?
@lordon1a on GitHub · 2026-11-24 01:01 UTC · original
fix/pipeline-staging-cleanup→main· +31 −2 · 1 files · 1 commits · merged 2026-11-24 07:52 UTCSummary
When
Cache::get_or_convert()(crates/victory-pipeline/src/cache.rs) fails to write or rename its staging file into the final cache path, the orphaned temporary file was left behind in the cache directory.This change:
OpenOptions::new().write(true).create_new(true)instead ofstd::fs::write, drops the file handle beforerename(required on Windows), and removes the staging file if writing or publishing fails.failed_publication_removes_the_staging_file) that creates a directory at the target cache path to forcerenamefailure and verifies no staging file remains.Verification
Tested on Windows 11 (
rustc 1.100.0,x86_64-pc-windows-gnullvm):cargo test -p victory-pipeline: 4 passed, 0 failed (the new test fails onmain@9aef3d9where the staging file is left behind).cargo clippy -p victory-pipeline --all-targets: 0 warnings.cargo xtask policy: 151 files ok (zero game data).AI-assisted.
@DaviTostes on GitHub · 2026-11-24 01:21 UTC · original
The test target does not compile, so the GPU suite cannot run:
The library builds; only
cargo testfails, on every platform. The new test module needs to go into the existingmod testsinhost.rsafter a rebase (the same failure as #134/#135/#175).No game data used.