diff --git a/Dockerfile.dapper b/Dockerfile.dapper index fb9fbd8..347bd08 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -1,9 +1,10 @@ -FROM registry.suse.com/bci/golang:1.22 +FROM registry.suse.com/bci/golang:1.23 ARG DAPPER_HOST_ARCH=amd64 ARG http_proxy ARG https_proxy ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH} +ENV GOLANGCI_LINT_VERSION="v1.60.3" RUN zypper -n addrepo --refresh https://download.opensuse.org/repositories/Base:System/openSUSE_Factory/Base:System.repo && \ zypper --gpg-auto-import-keys ref @@ -14,7 +15,7 @@ RUN zypper -n install glibc glibc-static gcc ca-certificates git wget curl vim l ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm64=arm64 GOLANG_ARCH=GOLANG_ARCH_${ARCH} \ GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash -RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2 +RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION} ENV DAPPER_SOURCE /go/src/github.com/longhorn/sparse-tools ENV DAPPER_OUTPUT ./bin coverage.out diff --git a/sparse/file.go b/sparse/file.go index 187f13a..17624bd 100644 --- a/sparse/file.go +++ b/sparse/file.go @@ -347,7 +347,7 @@ func GetFiemapRegionExts(file FileIoProcessor, interval Interval, extCount int) _, exts, errno := file.GetFieMap().FiemapRegion(uint32(extCount), uint64(interval.Begin), uint64(interval.End-interval.Begin)) if errno != 0 { log.Error("Failed to call fiemap.Fiemap(extCount)") - return exts, fmt.Errorf(errno.Error()) + return exts, fmt.Errorf("%v", errno) } log.Tracef("Retrieved %v/%v extents from file %v, interval %+v, elapsed %.2fs", diff --git a/sparse/sfold.go b/sparse/sfold.go index cfdfe80..480e59d 100644 --- a/sparse/sfold.go +++ b/sparse/sfold.go @@ -64,7 +64,7 @@ func coalesce(parentFileIo, childFileIo FileIoProcessor, fileSize int64, ops Fil defer func() { if err != nil { - log.Errorf(err.Error()) + log.Errorf("%v", err) updateProgress(progress, atomic.LoadUint32(progress), true, err, progressMutex, ops) } else { updateProgress(progress, progressComplete, true, nil, progressMutex, ops) diff --git a/sparse/sprune.go b/sparse/sprune.go index 773d0af..3940b51 100644 --- a/sparse/sprune.go +++ b/sparse/sprune.go @@ -60,7 +60,7 @@ func prune(parentFileIo, childFileIo FileIoProcessor, fileSize int64, ops FileHa defer func() { if err != nil { - log.Errorf(err.Error()) + log.Errorf("%v", err) updateProgress(progress, atomic.LoadUint32(progress), true, err, progressMutex, ops) } else { updateProgress(progress, progressComplete, true, nil, progressMutex, ops)