-
Notifications
You must be signed in to change notification settings - Fork 86
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
Improve the error msg for OCI v1.0 registries or registries that don't support deletion API #615
Comments
On a second thought, printing out a warning like this in CLI: |
Agree on not showing this ignorable error to CLI users. |
What will be the response that the CLI user will see? |
Without
|
Why do we put the Warning first? |
That's because this Warning is just an ordinary |
I think the warning message should always be there even if It can be something like $ notation sign --signature-format cose --key $REMOTE_KEY_NAME ghcr.io/demo-user/python@sha256:xxxx
Warning: Removal of outdated referrers index is not supported by the remote registry. Garbage collection may be required. |
Discussed offline with @shizhMSFT, we found it might be better to keep the |
This PR tries to resolve #615. --------- Signed-off-by: Patrick Zheng <[email protected]>
Reopen this issue since we need to refine the warning message. It requires another PR to improve the error message |
I will create another PR to refine the warning message as it only covers one of the possible scenarios at the moment. |
Closing the issue as it's resolved by this PR: #595. |
What is the areas you experience the issue in?
Notation CLI
What is not working as expected?
When using Notation CLI to sign an artifact in OCI v1.0 compliant registries such as GHCR or registries that don't support deletion API (e.g. Docker Hub), Notation will return an unexpected error message and may mislead or confuse users. It happens when signing an artifact for the second time.
What did you expect to happen?
Improve the error message to be more descriptive and user-friendly, and tell users about the right result exactly. Giving an example: Successfully signed
<registry>/<repository>@<digest>
. Please note that Notation can't delete the referrers index since this is an OCI v1.0 compliant registry or the deletion API is disabled by the registry.How can we reproduce it?
We have a user who signed a sample image in GHCR. It returned the following error message when this user signed the same image for the second time:
It may confuse users why this signing behavior failed due to an old referrers index manifest deletion failure. From an end user's point of view, the user is left with the impression that the signing failed. Now the user is left wondering why this happened and if she/he doesn't know the internals of OCI registries she/he may think the issue is with Notation.
In fact, the signing is successful and the signature has been attached to the image but it doesn't tell users the right result unless users view the referenced signatures using
notation list
as below.Describe your environment
Ubuntu 20.08
What is the version of your Notation CLI or Notation Library?
Notation CLI v1.0.0-RC.3
The text was updated successfully, but these errors were encountered: