-
Notifications
You must be signed in to change notification settings - Fork 82
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
Add error handle code for stale file handler when cl upload
#4304
Conversation
cl upload
Since this part of code is running by local CLI, and I can not create a stale file handler using local PC. Will keep an eye on this and test it out when CL version is updated. |
if ignore_nonexistent_path: | ||
# If we have trouble list the dir, return the size of this path as 0 | ||
# Do not raise error and just ignore the stale file handler/ | ||
return 0 |
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.
Could this potentially suppress other errors? Maybe worth printing out a warning at least (assuming it doesn't result in too much output)?
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.
Thank you! I will add a Warning print with the path, and test it out using the dev environment before getting it merged.
Reasons for making this change
When uploading from nlp machine, we might meet stale file handler(https://www.baeldung.com/linux/stale-file-handles) generated by other process. Add some code to just ignore those stale file handlers.
For stale file handlers, we can not even
![image](https://user-images.githubusercontent.com/40016222/200201534-911986ee-8598-4ba4-9633-074ebe02f2c7.png)
ls
them.Related issues
Screenshots
Checklist