Skip to content

Command to delete a blob from a remote registry #474

Closed

Description

@qweeah

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

Activity

  1. added this to the v0.15.0 milestone on Aug 3, 2022
  2. lizMSFT commented on Aug 9, 2022

    @lizMSFT
    Contributor

    please assign this to me

  3. lizMSFT commented on Aug 23, 2022

    @lizMSFT
    Contributor

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

    image
    image

    cc @shizhMSFT @yizha1 @FeynmanZhou

  4. yizha1 commented on Aug 24, 2022

    @yizha1

    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.
  5. lizMSFT commented on Aug 24, 2022

    @lizMSFT
    Contributor

    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.

  6. FeynmanZhou commented on Aug 24, 2022

    @FeynmanZhou
    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.

  7. sajayantony commented on Aug 24, 2022

    @sajayantony
    Contributor

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

  8. SteveLasker commented on Sep 9, 2022

    @SteveLasker
    Contributor

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

  9. qweeah commented on Sep 9, 2022

    @qweeah
    ContributorAuthor

    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.

  10. Repository owner moved this from Todo to Done in ORAS-Planningon Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions