-
Notifications
You must be signed in to change notification settings - Fork 42
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
update: Package verification refactoring #186
update: Package verification refactoring #186
Conversation
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]>
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]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed only half of the PR, but publishing comments. Will review the remaining files.
Signed-off-by: Patrick Zheng <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #186 +/- ##
==========================================
- Coverage 77.34% 73.71% -3.63%
==========================================
Files 33 27 -6
Lines 2189 1769 -420
==========================================
- Hits 1693 1304 -389
+ Misses 405 375 -30
+ Partials 91 90 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
This PR will be split into several smaller PRs to be reviewed. |
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In verifier_helpers.go
, not all receiver functions (i.e. methods associated with structs) are indeed receiver functions. We can make it a "static function".
Meanwhile, I suggest moving all receiver functions of the verifier
struct to verifier.go
and all others to helper.go
, and cleans up verifier_helpers.go
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest looks good to me
Signed-off-by: Patrick Zheng <[email protected]>
Done. |
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
6618671
to
fc5044e
Compare
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]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
As per discussion during community call and aligned with Vani, this PR can be merged with two approvals from one org. The leftover issue is tracked here #201. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR review order: This PR -> #200.
This PR refactors the verifier package. Files intended to be reviewed in this PR:
(This PR incorporates the refactored plugin and plugin/proto into the verifier package.)
This PR removes internal/mock_origin, internal/notation.go, and internal/registry, as they've been refactored in the previous PRs. internal/plugin is there for compile reason. After the refactoring of Sign (#200 ), internal/plugin shall be removed.
This PR does not change code related to Sign, so please skip the signature package for now. (Refactoring of signature package is inside #200)
Edit:
A brief summary after our multiple rounds of discussions:
a. if the total number of signatures associated with the artifact is larger than the user given MaxSignatureAttempts, errExceededMaxVerificationLimit will be returned.
b. Otherwise, ErrorVerificationFailed will be returned.