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

Improve error output for notation plugin #704

Open
FeynmanZhou opened this issue Jun 5, 2023 · 1 comment
Open

Improve error output for notation plugin #704

FeynmanZhou opened this issue Jun 5, 2023 · 1 comment
Labels
bug Something isn't working error message Issues related to error message improvement
Milestone

Comments

@FeynmanZhou
Copy link
Member

FeynmanZhou commented Jun 5, 2023

What is the areas you experience the issue in?

Notation CLI

What is not working as expected?

When putting an arbitrary file into the plugin folder:

notation plugin ls
NAME       DESCRIPTION   VERSION   CAPABILITIES   ERROR

azure-kv                           []             ERROR: response is not in JSON format. error: fork/exec /home/azureuser/.config/notation/plugins/azure-kv/notation-azure-kv: exec format error, stderr:

Suggestion: changing the error to /home/azureuser/.config/notation/plugins/azure-kv/notation-azure-kv: file format is not as expected

When the plugin name is not followed the plugin spec:

NAME       DESCRIPTION   VERSION   CAPABILITIES   ERROR

azure-kv                           []             stat /home/azureuser/.config/notation/plugins/azure-kv/notation-azure-kv: no such file or directory

Suggest: changing the error to Each plugin executable must be located under $PLUGIN_DIRECTORY/{plugin-name} directory, with executable named as notation-{plugin-name}.

When the notation plugin executable file is not executable:

NAME       DESCRIPTION   VERSION   CAPABILITIES   ERROR

azure-kv                           []             ERROR: response is not in JSON format. error: fork/exec /home/azureuser/.config/notation/plugins/azure-kv/notation-azure-kv: permission denied, stderr:

Suggest: changing it to /home/azureuser/.config/notation/plugins/azure-kv/notation-azure-kv: permission denied

When using an AMR64 arch of plugin file on an AMD64 machine:

notation plugin ls
NAME       DESCRIPTION   VERSION   CAPABILITIES   ERROR

azure-kv                           []             ERROR: response is not in JSON format. error: fork/exec /home/azureuser/.config/notation/plugins/azure-kv/notation-azure-kv: exec format error, stderr:

Suggest: changing the error to /home/azureuser/.config/notation/plugins/azure-kv/notation-azure-kv: file format is not as expected

What did you expect to happen?

See above

How can we reproduce it?

See above

Describe your environment

Ubuntu 20.08

What is the version of your Notation CLI or Notation Library?

v1.0.0-RC.7

@FeynmanZhou FeynmanZhou added bug Something isn't working triage Need to triage labels Jun 5, 2023
@yizha1 yizha1 removed the triage Need to triage label Jul 25, 2023
@yizha1 yizha1 added this to the Discuss milestone Jul 25, 2023
@yizha1 yizha1 modified the milestones: Discuss, 1.2.0 Apr 9, 2024
@yizha1
Copy link
Contributor

yizha1 commented Apr 9, 2024

Linked to error message improvements work planned in v1.2.0, #824.

@yizha1 yizha1 added the error message Issues related to error message improvement label Jul 12, 2024
@yizha1 yizha1 modified the milestones: 1.2.0, 1.3.0 Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working error message Issues related to error message improvement
Projects
Status: Todo
Development

No branches or pull requests

2 participants