update: Package verification refactoring#186
update: Package verification refactoring#186patrickzheng200 merged 51 commits intonotaryproject:mainfrom
Conversation
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>
rgnote
left a comment
There was a problem hiding this comment.
Reviewed only half of the PR, but publishing comments. Will review the remaining files.
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 <patrickzheng@microsoft.com>
|
This PR will be split into several smaller PRs to be reviewed. |
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
shizhMSFT
left a comment
There was a problem hiding this comment.
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.
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Done. |
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
6618671 to
fc5044e
Compare
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
|
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. |
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.