Harden build dir deletion against transient NFS failures [CI 1/9]#1595
Merged
Conversation
make_build_dir created its unique directory under /tmp and then string-replaced the prefix to FINN_BUILD_DIR, leaving a directory behind on every call. Create it directly inside FINN_BUILD_DIR then widen permissions so non-build UIDs can read the build tree. Add robust_rmtree, which retries the transient ENOTEMPTY that NFS raises when a tool subprocess closes a file just as the tree is removed, and adopt it in tests and cleanup.py. Signed-off-by: Marco Blackwell <mblackwe@amd.com>
Collaborator
|
Thank you, @merkelmarrow ! |
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.
This is PR 1 of 9 of a series intended to make CI faster and more robust.
This patch adds
robust_rmtree, a helper that replacesshutil.rmtreein several cleanup and test sites.robust_rmtreesimply retries a build tree deletion if it fails due toENOTEMPTYandEBUSYerrors associated with Network File System storage. These errors are a race that can happen when a tool subprocess closes a file just prior to removing the tree and caused non-deterministic test errors in a small percentage of samples.This change reflects the need to move our testing suite to NFS to make better use of distributed testing infrastructure.
make_build_dir()was also adjusted to stop leaving orphan directories in /tmp.