Repository navigation
pipeline: remove staging files when cache publication fails - #161
Merged
Merged
Conversation
Reserve a new staging path and clean it up if writing or publishing fails. Cover a failed publication with a synthetic destination directory.
|
The test target does not compile, so the GPU suite cannot run: The library builds; only No game data used. |
edsuuu
referenced
this pull request
in edsuuu/VI-BR-PORT
Nov 24, 2026
…fails Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closed
suirentakamura
referenced
this pull request
in suirentakamura/victory-suiren
Nov 24, 2026
pipeline: remove staging files when cache publication fails
itsonlysimbo
pushed a commit
to itsonlysimbo/VIctory
that referenced
this pull request
Nov 24, 2026
…eanup pipeline: remove staging files when cache publication fails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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.