-
Couldn't load subscription status.
- Fork 3.4k
Have test harness delete all old Emscripten files in the temp directory #25614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
If this specific to the parallel test runner or should it happen on startup in general? We do have It looks like we enable |
This should run in both singlethreaded and parallel runner startup.
Yeah, I remember creating that a long time ago to combat temp file leaks. Added that env. var. now to my CI bots, but wanted to ensure that even if these leaks do happen, that they won't be able to take my CI bots down. I see on all my CI bots that there are a bunch of |
Yes, I think we explictly do not clean stuff up when the run is interrupted, since this is good for debugging. |
|
Looking into this I noticed we were creating a lot more temp directories than we needed to: #25615 |
Agreed. That is why the idea here was to do the cleanup at startup, and not at end (or at |
… directory to help avoid runaway temp file leaks filling a CI system temp directory.
175321b to
d5c6e1a
Compare
Sounds good to me. I would feel more comfortable if it was just the |
The majority of the items are from I think combining this with running with |
|
I found some more usages of tempfile that we can completely remove : #25617 |
| try: | ||
| utils.delete_dir(os.path.join(shared.TEMP_DIR, entry)) | ||
| except Exception: | ||
| pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using force_delete_dir here... then I think you don't need the try/catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
force_delete_dir() raises an exception if the deletion failed. The thinking here was that it wouldn't be catastrophic if that happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough
When starting a test run, delete all old Emscripten files in the temp directory to help avoid runaway temp file leaks filling up a CI system hard drive.
Do it before starting a run, so that developers can still access test files in debug logs.