Skip to content

Make temporary cleanup nonfatal#370

Open
kiwigitops wants to merge 1 commit into
janestreet:masterfrom
kiwigitops:make-temp-cleanup-nonfatal
Open

Make temporary cleanup nonfatal#370
kiwigitops wants to merge 1 commit into
janestreet:masterfrom
kiwigitops:make-temp-cleanup-nonfatal

Conversation

@kiwigitops

Copy link
Copy Markdown

Fixes #303.

Temporary record directories are cleaned up in Monitor.protect's finally block. If that cleanup raises, the cleanup failure replaces the actual recording result, so a failure to remove perf.data can make an otherwise completed run fail.

This wraps automatic temp-directory cleanup in Monitor.try_with, logs a warning on failure, and still returns Deferred.unit from the finalizer. Explicit -working-directory paths are unchanged because those are not auto-cleaned.

Validated:

  • git diff --check

Signed-off-by: kiwigitops <kiwisclubco@gmail.com>
@kiwigitops

Copy link
Copy Markdown
Author

Quick follow-up on this small fix. The temp cleanup failure can still mask the real recording result, so this is still current from my side. Happy to adjust the warning path if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failure to remove perf.data is fatal

1 participant