-
Notifications
You must be signed in to change notification settings - Fork 201
Ignore errors when removing snapshot directory #1511
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
Ignore errors when removing snapshot directory #1511
Conversation
Reviewer's GuideAdjusted the remove_snapshot implementation so the snapshot directory cleanup never fails by enabling error suppression in the rmtree call. Updated Class Diagram: ModelStoreclassDiagram
class ModelStore {
+remove_snapshot(model_tag: str)
}
note for ModelStore "Implementation of remove_snapshot changed to ignore errors from shutil.rmtree."
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
2aa89e6
to
5f68492
Compare
Relates to: containers#1508 remove_snapshot should never fail, therefore adding the ignore_errors=True. Before removing a snapshot with ramalama rm an existence check is made. If the model does not exist, an error will be raised to preserve the previous behavior of that command. Signed-off-by: Michael Engel <mengel@redhat.com>
5f68492
to
830409e
Compare
LGTM... Will this fix or partially fix the issue @cedricclyburn saw? Was this tested? |
The failure to remove the snapshot directory is a subsequent error - and this PR makes the model store a bit more resilient. The failure in #1508 is due to the fallback to the hf cli, which we don't support multi-modal models. Ramalama uses the fallback probably due to an API error (rate limiting?) in the first, multi-modal supporting method. |
Relates to: #1508
remove_snapshot should never fail and, therefore, the shutil.rmtree call needs ignore_errors=True.
/cc @olliewalsh
Summary by Sourcery
Bug Fixes: