diff --git a/Dockerfile.dapper b/Dockerfile.dapper index 90976e381..59897cf75 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -1,4 +1,4 @@ -FROM registry.suse.com/bci/golang:1.22 +FROM registry.suse.com/bci/golang:1.23 ARG DAPPER_HOST_ARCH ARG http_proxy @@ -15,6 +15,8 @@ ENV DAPPER_OUTPUT bin coverage.out ENV DAPPER_RUN_ARGS --privileged --tmpfs /go/src/github.com/longhorn/longhorn-engine/integration/.venv:exec --tmpfs /go/src/github.com/longhorn/longhorn-engine/integration/.tox:exec -v /dev:/host/dev -v /proc:/host/proc --mount type=bind,source=/tmp,destination=/host/tmp,bind-propagation=rslave ENV DAPPER_SOURCE /go/src/github.com/longhorn/longhorn-engine +ENV GOLANGCI_LINT_VERSION="v1.60.3" + WORKDIR ${DAPPER_SOURCE} ENTRYPOINT ["./scripts/entry"] CMD ["ci"] @@ -36,7 +38,7 @@ RUN zypper -n install cmake curl git less file gcc python311 python311-pip pytho rm -rf /var/cache/zypp/* # Install golangci-lint -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} # Install Minio ENV MINIO_URL_amd64=https://dl.min.io/server/minio/release/linux-amd64/archive/minio.RELEASE.2021-12-20T22-07-16Z \ diff --git a/pkg/backup/main.go b/pkg/backup/main.go index ff5d95962..531353536 100644 --- a/pkg/backup/main.go +++ b/pkg/backup/main.go @@ -49,7 +49,7 @@ func ResponseLogAndError(v interface{}) { e, isErr := v.(error) _, isRuntimeErr := e.(runtime.Error) if isErr && !isRuntimeErr { - logrus.Errorf(fmt.Sprint(e)) + logrus.Errorf("%v", e) fmt.Println(fmt.Sprint(e)) } else { logrus.Errorf("Caught FATAL error: %s", v) diff --git a/pkg/replica/diff_disk.go b/pkg/replica/diff_disk.go index 4be04ff13..1406dfb19 100644 --- a/pkg/replica/diff_disk.go +++ b/pkg/replica/diff_disk.go @@ -271,7 +271,7 @@ func (d *diffDisk) lookup(sector int64) (byte, error) { for i := len(d.files) - 1; i > 1; i-- { e, errno := fibmap.Fiemap(d.files[i].Fd(), uint64(sector*d.sectorSize), uint64(d.sectorSize), 1) if errno != 0 { - return 0, fmt.Errorf(errno.Error()) + return 0, fmt.Errorf("%v", errno) } if len(e) > 0 { d.location[sector] = byte(i) diff --git a/pkg/replica/rpc/server.go b/pkg/replica/rpc/server.go index 5b3f87642..67bf58c28 100644 --- a/pkg/replica/rpc/server.go +++ b/pkg/replica/rpc/server.go @@ -188,7 +188,7 @@ func (rs *ReplicaServer) ReplicaExpand(ctx context.Context, req *enginerpc.Repli errWithCode = types.NewError(types.ErrorCodeFunctionFailedWithoutRollback, err.Error(), "") } - return nil, status.Errorf(codes.Internal, errWithCode.ToJSONString()) + return nil, status.Errorf(codes.Internal, "%s", errWithCode.ToJSONString()) } return &enginerpc.ReplicaExpandResponse{Replica: rs.getReplica()}, nil