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

feat: notation plugin install command #827

Merged
merged 88 commits into from Dec 21, 2023

Conversation

Two-Hearts
Copy link
Contributor

@Two-Hearts Two-Hearts commented Nov 8, 2023

This PR is based on the new spec: #809

It supports following notation plugin installations:

  1. Install from .tar.gz/.zip file in file system
  2. Install from HTTPS URL, SHA256 checksum is required
  3. Install a plugin executable file in file system

Test: Corresponding E2E test cases are added in this PR as well.

Note: This PR depends on the notation-go PR: notaryproject/notation-go#364

The notation-go PR: notaryproject/notation-go#364 has been Merged.

Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
cmd/notation/plugin/install.go Fixed Show fixed Hide fixed
cmd/notation/plugin/install.go Fixed Show fixed Hide fixed
@codecov-commenter
Copy link

codecov-commenter commented Nov 8, 2023

Codecov Report

Attention: 129 lines in your changes are missing coverage. Please review.

Comparison is base (df8596d) 64.39% compared to head (45788ae) 63.59%.

Files Patch % Lines
cmd/notation/plugin/install.go 58.37% 78 Missing and 14 partials ⚠️
internal/osutil/file.go 47.91% 18 Missing and 7 partials ⚠️
cmd/notation/internal/plugin/plugin.go 57.14% 8 Missing and 4 partials ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #827      +/-   ##
==========================================
- Coverage   64.39%   63.59%   -0.80%     
==========================================
  Files          42       45       +3     
  Lines        2390     2692     +302     
==========================================
+ Hits         1539     1712     +173     
- Misses        720      824     +104     
- Partials      131      156      +25     

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

cmd/notation/internal/plugin/plugin.go Outdated Show resolved Hide resolved
cmd/notation/internal/plugin/plugin.go Outdated Show resolved Hide resolved
cmd/notation/internal/plugin/plugin.go Outdated Show resolved Hide resolved
cmd/notation/internal/plugin/plugin.go Outdated Show resolved Hide resolved
cmd/notation/internal/plugin/plugin.go Outdated Show resolved Hide resolved
cmd/notation/plugin/install.go Outdated Show resolved Hide resolved
cmd/notation/plugin/install.go Outdated Show resolved Hide resolved
cmd/notation/plugin/install.go Outdated Show resolved Hide resolved
cmd/notation/plugin/install.go Outdated Show resolved Hide resolved
cmd/notation/internal/plugin/plugin.go Outdated Show resolved Hide resolved
cmd/notation/plugin/install.go Outdated Show resolved Hide resolved
cmd/notation/internal/plugin/plugin.go Outdated Show resolved Hide resolved
cmd/notation/internal/plugin/plugin.go Outdated Show resolved Hide resolved
cmd/notation/internal/plugin/plugin.go Outdated Show resolved Hide resolved
cmd/notation/internal/plugin/plugin.go Outdated Show resolved Hide resolved
cmd/notation/internal/plugin/plugin.go Outdated Show resolved Hide resolved
cmd/notation/internal/plugin/plugin.go Outdated Show resolved Hide resolved
cmd/notation/plugin/install.go Outdated Show resolved Hide resolved
internal/osutil/file.go Outdated Show resolved Hide resolved
cmd/notation/plugin/install.go Outdated Show resolved Hide resolved
cmd/notation/plugin/install.go Outdated Show resolved Hide resolved
cmd/notation/plugin/install.go Outdated Show resolved Hide resolved
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
cmd/notation/internal/plugin/plugin.go Outdated Show resolved Hide resolved
cmd/notation/plugin/install.go Outdated Show resolved Hide resolved
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@priteshbandi priteshbandi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

We should track all the open comments in an issue and address them before 1.1 release

test/e2e/suite/plugin/install.go Show resolved Hide resolved
cmd/notation/plugin/install.go Show resolved Hide resolved
cmd/notation/plugin/install.go Show resolved Hide resolved
cmd/notation/internal/plugin/plugin.go Show resolved Hide resolved
cmd/notation/plugin/install.go Show resolved Hide resolved
cmd/notation/plugin/install.go Show resolved Hide resolved
cmd/notation/plugin/install.go Show resolved Hide resolved
internal/osutil/file.go Show resolved Hide resolved
internal/osutil/file.go Show resolved Hide resolved
cmd/notation/plugin/install.go Show resolved Hide resolved
@Two-Hearts
Copy link
Contributor Author

@priteshbandi As discussed, issue created: #853

@Two-Hearts Two-Hearts merged commit 0f85752 into notaryproject:main Dec 21, 2023
5 checks passed
@Two-Hearts Two-Hearts deleted the plugin-install branch December 21, 2023 07:57
rgnote pushed a commit to rgnote/notation that referenced this pull request Mar 8, 2024
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
rgnote pushed a commit to rgnote/notation that referenced this pull request Mar 8, 2024
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: rgnote <5878554+rgnote@users.noreply.github.com>
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.

None yet

8 participants