[TUF] Retry temp directory removals #1546
Merged
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.
I've seen some error logs
updates library contains invalid version
from theTidyLibrary
routine, where the invalid version is one of the temporary directories we use to stage downloads before they're ready for use. These directories are supposed to get cleaned up before the update was completed, but they weren't. It looks like at least on Windows this is sometimes due to Windows holding onto the dir a little longer than expected, giving us errors about the launcher.exe in the directory still being in use.This isn't a huge deal -- the
TidyLibrary
routine does correctly remove these versions anyway -- but it would be nice to not see these errors as frequently, so I've added a backoff-retry for the directory removal.