Repository navigation
fix(onnx): remove a failed stage even after cancellation or timeout - #3
Draft
autoantohaki wants to merge 1 commit into
Draft
autoantohaki wants to merge 1 commit into
autoantohaki wants to merge 1 commit into
Conversation
install and import cleaned up their staging directory with the same cancellation token and deadline that had just failed. remove_safe checks that budget first, so a cancelled or timed-out operation skipped cleanup and left partial artifacts in .<bundle>.staging until the next attempt. Run the cleanup under its own token and a separate 30 second budget.
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.
Requested by mau
Before: if
ModelStore::installorModelStore::importfailed because it was cancelled or ran past its deadline, it tried to delete its.<bundle>.stagingdirectory with the same token and deadline that had just expired.remove_safechecks that budget before doing anything, so the cleanup returned straight away and left the partial artifacts on disk until the next install or import.After: a failed stage is always removed, whatever the reason for the failure.
How: a new
discard_stagehelper runsremove_safewith a fresh cancellation token and its own 30-secondSTAGE_CLEANUP_BUDGET.installandimportboth use it. A new test cancels an install partway through a slow download and checks that the staging directory is gone. Without the fix, this test fails.Note: this PR changes
.rssources, so the Windows runtime qualification attestation has to be re-recorded beforeverify-runtime-qualification-attestation.ps1passes.