From 9ebcdc8b8d34953e6c205f2afbb6bd10b7e1c5f9 Mon Sep 17 00:00:00 2001 From: Nikita Zinkevich Date: Wed, 21 Aug 2024 12:47:18 +0300 Subject: [PATCH] [#470] Update Go version to 1.22 Signed-off-by: Nikita Zinkevich --- .docker/Dockerfile | 2 +- .forgejo/workflows/builds.yml | 2 +- .forgejo/workflows/dco.yml | 2 +- .forgejo/workflows/tests.yml | 4 ++-- .forgejo/workflows/vulncheck.yml | 2 +- .golangci.yml | 3 ++- Makefile | 4 ++-- go.mod | 2 +- internal/frostfs/policy/contract/contract.go | 2 +- 9 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index c82c950..252024f 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21 AS builder +FROM golang:1.22 AS builder ARG BUILD=now ARG REPO=git.frostfs.info/TrueCloudLab/frostfs-s3-gw diff --git a/.forgejo/workflows/builds.yml b/.forgejo/workflows/builds.yml index 17f1f2e..490a97c 100644 --- a/.forgejo/workflows/builds.yml +++ b/.forgejo/workflows/builds.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go_versions: [ '1.21', '1.22' ] + go_versions: [ '1.22', '1.23' ] fail-fast: false steps: - uses: actions/checkout@v3 diff --git a/.forgejo/workflows/dco.yml b/.forgejo/workflows/dco.yml index 0d5acda..4acd633 100644 --- a/.forgejo/workflows/dco.yml +++ b/.forgejo/workflows/dco.yml @@ -12,7 +12,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v3 with: - go-version: '1.22' + go-version: '1.23' - name: Run commit format checker uses: https://git.frostfs.info/TrueCloudLab/dco-go@v3 diff --git a/.forgejo/workflows/tests.yml b/.forgejo/workflows/tests.yml index ca777ee..db7f986 100644 --- a/.forgejo/workflows/tests.yml +++ b/.forgejo/workflows/tests.yml @@ -10,7 +10,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: '1.22' + go-version: '1.23' cache: true - name: Install linters @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go_versions: [ '1.21', '1.22' ] + go_versions: [ '1.22', '1.23' ] fail-fast: false steps: - uses: actions/checkout@v3 diff --git a/.forgejo/workflows/vulncheck.yml b/.forgejo/workflows/vulncheck.yml index 7a82bc3..37730d8 100644 --- a/.forgejo/workflows/vulncheck.yml +++ b/.forgejo/workflows/vulncheck.yml @@ -12,7 +12,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v3 with: - go-version: '1.22' + go-version: '1.23' - name: Install govulncheck run: go install golang.org/x/vuln/cmd/govulncheck@latest diff --git a/.golangci.yml b/.golangci.yml index 6174a52..817cba0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -12,7 +12,8 @@ run: # output configuration options output: # colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number" - format: tab + formats: + - format: tab # all available settings of specific linters linters-settings: diff --git a/Makefile b/Makefile index e074da2..aacdccf 100755 --- a/Makefile +++ b/Makefile @@ -4,8 +4,8 @@ REPO ?= $(shell go list -m) VERSION ?= $(shell git describe --tags --dirty --match "v*" --always --abbrev=8 2>/dev/null || cat VERSION 2>/dev/null || echo "develop") GO_VERSION ?= 1.22 -LINT_VERSION ?= 1.56.1 -TRUECLOUDLAB_LINT_VERSION ?= 0.0.5 +LINT_VERSION ?= 1.60.3 +TRUECLOUDLAB_LINT_VERSION ?= 0.0.6 BINDIR = bin METRICS_DUMP_OUT ?= ./metrics-dump.json diff --git a/go.mod b/go.mod index fb606f8..7e8b4cc 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module git.frostfs.info/TrueCloudLab/frostfs-s3-gw -go 1.21 +go 1.22 require ( git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240726072425-3dfa2f4fd65e diff --git a/internal/frostfs/policy/contract/contract.go b/internal/frostfs/policy/contract/contract.go index eac4ea6..97f97de 100644 --- a/internal/frostfs/policy/contract/contract.go +++ b/internal/frostfs/policy/contract/contract.go @@ -189,7 +189,7 @@ func (m *multiTX) wrapCall(method string, args []any) { if err == nil { return } - if !errors.Is(commonclient.ErrTransactionTooLarge, err) { + if !errors.Is(err, commonclient.ErrTransactionTooLarge) { m.err = err return }