Skip to content
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

Command to delete a blob from a remote registry #474

Closed
Tracked by #459
qweeah opened this issue Aug 3, 2022 · 8 comments · Fixed by #493
Closed
Tracked by #459

Command to delete a blob from a remote registry #474

qweeah opened this issue Aug 3, 2022 · 8 comments · Fixed by #493
Assignees
Milestone

Comments

@qweeah
Copy link
Contributor

qweeah commented Aug 3, 2022

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

@lizMSFT
Copy link
Contributor

lizMSFT commented Aug 9, 2022

please assign this to me

@lizMSFT
Copy link
Contributor

lizMSFT commented Aug 23, 2022

Current UX:
oras blob delete localhost:5000/0817hello@sha256:73720a3a5a2809700408e72ede153c7985889b1796a0b5edb30188e89edced5c

image
image

cc @shizhMSFT @yizha1 @FeynmanZhou

@yizha1
Copy link

yizha1 commented Aug 24, 2022

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.

@lizMSFT
Copy link
Contributor

lizMSFT commented Aug 24, 2022

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.

@FeynmanZhou
Copy link
Member

  • 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.

@sajayantony
Copy link
Contributor

Experience of oras blob delete localhost:5000/0817hello@sha256:73720a3a5a2809700408e72ede153c7985889b1796a0b5edb30188e89edced5c
sounds good 👍

@SteveLasker
Copy link
Contributor

Are we trying to delete a blob, or an artifact?

@qweeah
Copy link
Contributor Author

qweeah commented Sep 9, 2022

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.

Repository owner moved this from Todo to Done in ORAS-Planning Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

7 participants