-
Notifications
You must be signed in to change notification settings - Fork 139
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: make image digest check more permissive #2510
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2510 +/- ##
==========================================
+ Coverage 61.47% 66.90% +5.42%
==========================================
Files 129 130 +1
Lines 15381 12048 -3333
==========================================
- Hits 9456 8061 -1395
+ Misses 4990 3010 -1980
- Partials 935 977 +42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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
/hold @lkingland sorry didnt realize ports can be added to the name! thanks.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gauron99, lkingland The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Couldn't we implement func isDigested(v string) (validDigest bool, err error) {
ref, err := name.ParseReference(v)
if err != nil {
return false, err
}
_, ok := ref.(name.Digest)
return ok, nil
} or func isDigested(v string) (validDigest bool, err error) {
ref, err := reference.Parse(v)
if err != nil {
return false, err
}
_, ok := ref.(reference.Digested)
return ok, nil
} ? |
Yes, I prefer this; using an extant implementation when available. |
e8e0160
to
1be1e14
Compare
/lgtm |
Makes the image digest check and validation a bit more permissive.
Fixes #2508
/kind bug