Skip to content

Commit

Permalink
Merge pull request #1786 from alexandear/disable-two-staticcheck-issues
Browse files Browse the repository at this point in the history
Fix staticcheck issues; show all lint issues in CI
  • Loading branch information
openshift-merge-bot[bot] authored Jan 6, 2024
2 parents 8a44f84 + 6f2baf4 commit 47146e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
version: "${{ env.LINT_VERSION }}"
only-new-issues: true
args: --verbose
# Extra linters, only checking new code from a pull request.
- name: Extra golangci-lint config. switcharoo
Expand Down
10 changes: 7 additions & 3 deletions libimage/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,12 @@ func (r *Runtime) LookupImage(name string, options *LookupImageOptions) (*Image,
if storageRef.Transport().Name() != storageTransport.Transport.Name() {
return nil, "", fmt.Errorf("unsupported transport %q for looking up local images", storageRef.Transport().Name())
}
img, err := storageTransport.Transport.GetStoreImage(r.store, storageRef)
_, img, err := storageTransport.ResolveReference(storageRef)
if err != nil {
if errors.Is(err, storageTransport.ErrNoSuchImage) {
// backward compatibility
return nil, "", storage.ErrImageUnknown
}
return nil, "", err
}
logrus.Debugf("Found image %q in local containers storage (%s)", name, storageRef.StringWithinTransport())
Expand Down Expand Up @@ -346,9 +350,9 @@ func (r *Runtime) lookupImageInLocalStorage(name, candidate string, namedCandida
if err != nil {
return nil, err
}
img, err = storageTransport.Transport.GetStoreImage(r.store, ref)
_, img, err = storageTransport.ResolveReference(ref)
if err != nil {
if errors.Is(err, storage.ErrImageUnknown) {
if errors.Is(err, storageTransport.ErrNoSuchImage) {
return nil, nil
}
return nil, err
Expand Down

0 comments on commit 47146e7

Please sign in to comment.