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.

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: Patch coverage is 59.56113% with 129 lines in your changes missing coverage. Please review.

Project coverage is 63.59%. Comparing base (df8596d) to head (45788ae).
Report is 114 commits behind head on main.

Files with missing lines 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 ⚠️
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
@Two-Hearts Two-Hearts requested a review from shizhMSFT November 16, 2023 04:04
cmd/notation/plugin/install.go Outdated Show resolved Hide resolved
cmd/notation/internal/plugin/plugin.go Outdated Show resolved Hide resolved
@Two-Hearts Two-Hearts requested a review from JeyJeyGao November 20, 2023 07:03
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 <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
@Two-Hearts Two-Hearts reopened this Dec 20, 2023
@Two-Hearts Two-Hearts requested a review from shizhMSFT December 20, 2023 08:37
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
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 <[email protected]>
@Two-Hearts Two-Hearts requested a review from shizhMSFT December 21, 2023 06:42
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
rgnote pushed a commit to rgnote/notation that referenced this pull request Mar 8, 2024
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.

8 participants