oras icon indicating copy to clipboard operation
oras copied to clipboard

Command to delete a manifest from a remote registry

Open qweeah opened this issue 3 years ago • 1 comments

The proposed commands is:

Usage:
  oras manifest delete REG/REPO<:TAG|@DIGEST> [flags]

Flags:
  --ca-file string               server certificate authority file for the remote registry
  -d, --debug                    debug mode
  -h, --help                     help for deleting a manifest
      --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

Related to #459

qweeah avatar Aug 03 '22 03:08 qweeah

Hi team, I'm interested in resolving both this issue and #472.

yuehaoliang avatar Aug 09 '22 03:08 yuehaoliang

The UX of az acr manifest delete is:

yuehaoliang@yuehaoliang:~$ az acr manifest delete yuehaoliang.azurecr.io/hello:v1
Command group 'acr manifest' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Are you sure you want to delete the artifact 'sha256:f04e7500b73d0d0b970c04f1a53c79134f5ecffb8690cb454dca551354763412' and all manifests that refer to it? (y/n): y

Refer to az-acr-manifest-delete.

yuehaoliang avatar Aug 25 '22 08:08 yuehaoliang

Use case: use -h to see the usage of oras manifest delete: image Use Case: decide not to delete the manifest: image Use Case: decide to delete the manifest: image Use Case: user flag --yes or -y to confirm deleting the manifest: image Use Case: --descriptor will print the descriptor of the manifest: image Use Case: use digest to delete the manifest: image Use case: miss the tag or digest image Use case: the manifest does not exist: image

According to the discussion about UX listed in #459, newly made some modification to the above PR. Here attached some simple use cases.

yuehaoliang avatar Aug 25 '22 09:08 yuehaoliang

Updated some UX: image image image image image image image

yuehaoliang avatar Sep 02 '22 06:09 yuehaoliang

Should oras manifest delete support --platform to delete the manifest of a specific platform if target is multi-platform capable? @qweeah @shizhMSFT

yuehaoliang avatar Sep 07 '22 05:09 yuehaoliang

No, --plaform should not apply to any delete operation.

shizhMSFT avatar Sep 07 '22 05:09 shizhMSFT