-
Notifications
You must be signed in to change notification settings - Fork 178
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
Avoid failing if file is quickly created and deleted #3105
Avoid failing if file is quickly created and deleted #3105
Conversation
How to use the Graphite Merge QueueAdd the label graphite-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
cbce038
to
85a145c
Compare
Merge activity
|
### Motivation I noticed that we were crashing if a file was quickly created and deleted. Before we got to processing the created notification, the file would already no longer be there and trying to read from disk would raise. This can happen when running tests that automatically created/delete files or if switching branches quickly. ### Implementation Just started rescuing `Errno::ENOENT`. If the file is no longer there, it probably means we just haven't processed its deleted notification. ### Automated Tests Added a test that fails before the fix.
85a145c
to
9f0f8f2
Compare
Motivation
I noticed that we were crashing if a file was quickly created and deleted. Before we got to processing the created notification, the file would already no longer be there and trying to read from disk would raise.
This can happen when running tests that automatically created/delete files or if switching branches quickly.
Implementation
Just started rescuing
Errno::ENOENT
. If the file is no longer there, it probably means we just haven't processed its deleted notification.Automated Tests
Added a test that fails before the fix.