oras
oras copied to clipboard
Command to delete a blob from a remote registry
The proposed commands is:
Usage:
oras blob delete REG/REPO@DIGEST [flags]
Flags:
--ca-file string server certificate authority file for the remote registry
-d, --debug debug mode
-h, --help help for deleting a blob
--insecure allow connections to SSL registry without certs
-p, --password string registry password or identity token
--password-stdin read password or identity token from stdin
--plain-http allow insecure connections to registry without SSL check
-u, --username string registry username
-v, --verbose verbose output
Only the specified blob will be deleted, predecessor nodes will not be touched.
Related to #459
please assign this to me
Current UX:
oras blob delete localhost:5000/0817hello@sha256:73720a3a5a2809700408e72ede153c7985889b1796a0b5edb30188e89edced5c
cc @shizhMSFT @yizha1 @FeynmanZhou
How can users make sure they delete the right blob?
- We could add a help doc to show the user how to get the digest for a blob
- How about a confirmation dialog before deleting the blob, and a
--force
flag that user can delete the blob without confirmation.
How can users make sure they delete the right blob?
- We could add a help doc to show the user how to get the digest for a blob
- How about a confirmation dialog before deleting the blob, and a
--force
flag that user can delete the blob without confirmation.
Do you mean adding some help messages to tell users how to calculate the digest for a blob? (for example, using sha256sum
command: sha256sum artifact2.txt
), or add help doc for users to find the digest for a blob?
From my point of view, delete a blob could be a dangerous behavior, and users should know what they are doing, and know exactly what they are going to delete. So I'm not sure whether it is necessary to have a help doc.
For the second one, I think we could add this confirmation dialog in the future if there are some feedbacks from users. This is probably out of scope for the current issue.
- We could add a help doc to show the user how to get the digest for a blob
I think we can prompt users that oras discover
has this capability.
- How about a confirmation dialog before deleting the blob, and a
--force
flag that user can delete the blob without confirmation.
I think it is not necessary to add confirmation prompt in this first-time implementation when users explictly delete a blob with specifying a digest.
According to the suggestion of Confirm before doing anything dangerous in CLIG, we can wait for users feedback to determine whether this prompt is needed in the next release.
Experience of oras blob delete localhost:5000/0817hello@sha256:73720a3a5a2809700408e72ede153c7985889b1796a0b5edb30188e89edced5c
sounds good 👍
Are we trying to delete a blob, or an artifact?
Are we trying to delete a blob, or an artifact?
@SteveLasker This command is designed for deleting only a blob.
Deleting an artifact can be done via oras manifest delete
.