-
Notifications
You must be signed in to change notification settings - Fork 183
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
feat: support delete a blob from a remote registry #493
Conversation
5b252e4
to
7f681c7
Compare
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.
LGTM
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.
We need to wrap all the err
returning from deleteBlob()
to make error message more readable to user.
e.g.
if err = repo.Delete(ctx, desc); err != nil {
return fmt.Errorf("failed to delete %s: %w", opts.targetRef, err)
}
It's better to have a confirmation before deletion. Also, it is good to display a warning on the implication of deleting a blob. Again, have you tried with those delete-disabled registries? What does the error message look like? |
Signed-off-by: Zoey Li <zoeyli@microsoft.com>
Signed-off-by: Zoey Li <zoeyli@microsoft.com>
Hi @shizhMSFT, I tried delete a blob from a delete-disabled registry, below is the current error message: cc @yuehaoliang-microsoft |
Codecov Report
@@ Coverage Diff @@
## main #493 +/- ##
==========================================
- Coverage 71.37% 68.83% -2.54%
==========================================
Files 12 13 +1
Lines 489 507 +18
==========================================
Hits 349 349
- Misses 112 130 +18
Partials 28 28
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
I've seen this error when I previously used oras/distribution without enabling the deletion. Maybe we can have a more clear error message to let users know it the registry server side which they use doesn't accept the delete operation. At least, |
Signed-off-by: Zoey Li <zoeyli@microsoft.com>
Signed-off-by: Zoey Li <108315938+lizMSFT@users.noreply.github.com>
Signed-off-by: Zoey Li <zoeyli@microsoft.com>
@Wwwsylvia, we should support this in the |
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.
LGTM
Signed-off-by: Zoey Li <zoeyli@microsoft.com>
Add a command to delete a blob from a remote registry
Resolves: #474
Signed-off-by: Zoey Li zoeyli@microsoft.com