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

fix: plugin error message #1217

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

JeyJeyGao
Copy link
Contributor

@JeyJeyGao JeyJeyGao commented Mar 12, 2025

Examples:

When putting an arbitrary file into the plugin folder:

NAME                   DESCRIPTION   VERSION   CAPABILITIES   ERROR                                                                                                                                                                                                                              
azure-trustedsigning                           []             fork/exec /home/jj/.config/notation/plugins/azure-trustedsigning/notation-azure-trustedsigning: exec format error. Please ensure that the plugin executable file is compatible with linux/amd64

When the plugin name is not followed the plugin spec:

NAME                   DESCRIPTION   VERSION   CAPABILITIES   ERROR                                                                                                                                                                                                                                                                                                                        
azure-trustedsigning                           []             stat /home/jj/.config/notation/plugins/azure-trustedsigning/notation-azure-trustedsigning: no such file or directory. 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-trustedsigning                           []             fork/exec /home/jj/.config/notation/plugins/azure-trustedsigning/notation-azure-trustedsigning: permission denied

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

NAME                   DESCRIPTION   VERSION   CAPABILITIES   ERROR                                                                                                                                                                                                                              
azure-trustedsigning                           []             fork/exec /home/jj/.config/notation/plugins/azure-trustedsigning/notation-azure-trustedsigning: exec format error. Please ensure that the plugin executable file is compatible with linux/amd64

Resolves #704

Signed-off-by: Junjie Gao <[email protected]>
Copy link

codecov bot commented Mar 12, 2025

Codecov Report

Attention: Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 76.52%. Comparing base (167bfd4) to head (7f23e76).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
cmd/notation/plugin/list.go 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1217      +/-   ##
==========================================
+ Coverage   76.33%   76.52%   +0.19%     
==========================================
  Files          67       67              
  Lines        3697     3710      +13     
==========================================
+ Hits         2822     2839      +17     
+ Misses        675      672       -3     
+ Partials      200      199       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Junjie Gao <[email protected]>
@JeyJeyGao JeyJeyGao marked this pull request as ready for review March 12, 2025 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve error output for notation plugin
1 participant