From aa6bed8a6ca337308da6a546aefd2cc23b008e1f Mon Sep 17 00:00:00 2001 From: Evgenii Baidakov Date: Fri, 22 Sep 2023 10:49:20 +0400 Subject: [PATCH 1/3] *: Set min go version to 1.19 closes #262 Signed-off-by: Evgenii Baidakov --- .github/workflows/builds.yml | 4 ++-- .github/workflows/tests.yml | 4 ++-- Dockerfile | 2 +- Makefile | 2 +- go.mod | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index ffac0c2..97db425 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -23,7 +23,7 @@ jobs: uses: actions/setup-go@v4 with: cache: true - go-version: '1.20' + go-version: '1.21' - name: Update Go modules run: make dep @@ -48,7 +48,7 @@ jobs: uses: actions/setup-go@v4 with: cache: true - go-version: '1.20' + go-version: '1.21' - name: Update Go modules run: make dep diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3501a47..878d22b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,7 +36,7 @@ jobs: uses: actions/setup-go@v4 with: cache: true - go-version: '1.20' + go-version: '1.21' - name: Update Go modules run: make dep @@ -56,7 +56,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - go_versions: [ '1.18', '1.19', '1.20' ] + go_versions: [ '1.19', '1.20', '1.21' ] fail-fast: false steps: - uses: actions/checkout@v3 diff --git a/Dockerfile b/Dockerfile index 575c9ac..0df58ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20-alpine as basebuilder +FROM golang:1.21-alpine as basebuilder RUN apk add --update make bash ca-certificates FROM basebuilder as builder diff --git a/Makefile b/Makefile index 332b647..e8eda0f 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ REPO ?= $(shell go list -m) VERSION ?= $(shell git describe --tags --match "v*" --dirty --always --abbrev=8 2>/dev/null || cat VERSION 2>/dev/null || echo "develop") -GO_VERSION ?= 1.20 +GO_VERSION ?= 1.21 LINT_VERSION ?= 1.49.0 BUILD ?= $(shell date -u --iso=seconds) diff --git a/go.mod b/go.mod index 5fef397..7a0b801 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/nspcc-dev/neofs-http-gw -go 1.18 +go 1.19 require ( github.com/docker/docker v24.0.5+incompatible From 5e67deaa31c166907647aba48d0eecb2839369c6 Mon Sep 17 00:00:00 2001 From: Evgenii Baidakov Date: Fri, 22 Sep 2023 10:56:26 +0400 Subject: [PATCH 2/3] *: Use sync/atomic instead of go.uber.org/atomic Signed-off-by: Evgenii Baidakov --- downloader/download.go | 2 +- go.mod | 2 +- uploader/upload.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/downloader/download.go b/downloader/download.go index d50a16e..dbba1e0 100644 --- a/downloader/download.go +++ b/downloader/download.go @@ -13,6 +13,7 @@ import ( "path" "strconv" "strings" + "sync/atomic" "time" "unicode" "unicode/utf8" @@ -31,7 +32,6 @@ import ( "github.com/nspcc-dev/neofs-sdk-go/pool" "github.com/nspcc-dev/neofs-sdk-go/user" "github.com/valyala/fasthttp" - "go.uber.org/atomic" "go.uber.org/zap" ) diff --git a/go.mod b/go.mod index 7a0b801..4c4f3bf 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,6 @@ require ( github.com/stretchr/testify v1.8.4 github.com/testcontainers/testcontainers-go v0.22.0 github.com/valyala/fasthttp v1.34.0 - go.uber.org/atomic v1.10.0 go.uber.org/zap v1.24.0 ) @@ -77,6 +76,7 @@ require ( github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/urfave/cli v1.22.12 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect + go.uber.org/atomic v1.10.0 // indirect go.uber.org/goleak v1.1.12 // indirect go.uber.org/multierr v1.9.0 // indirect golang.org/x/crypto v0.12.0 // indirect diff --git a/uploader/upload.go b/uploader/upload.go index 6798030..66db722 100644 --- a/uploader/upload.go +++ b/uploader/upload.go @@ -8,6 +8,7 @@ import ( "io" "net/http" "strconv" + "sync/atomic" "time" "github.com/nspcc-dev/neofs-http-gw/resolver" @@ -21,7 +22,6 @@ import ( "github.com/nspcc-dev/neofs-sdk-go/pool" "github.com/nspcc-dev/neofs-sdk-go/user" "github.com/valyala/fasthttp" - "go.uber.org/atomic" "go.uber.org/zap" ) From 8cd4fff2f67375390232bb13da1b96724687df46 Mon Sep 17 00:00:00 2001 From: Evgenii Baidakov Date: Fri, 22 Sep 2023 10:59:16 +0400 Subject: [PATCH 3/3] go.mod: Bump neo-go to 0.102 Signed-off-by: Evgenii Baidakov --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4c4f3bf..5d04829 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.19 require ( github.com/docker/docker v24.0.5+incompatible github.com/fasthttp/router v1.4.1 - github.com/nspcc-dev/neo-go v0.101.0 + github.com/nspcc-dev/neo-go v0.102.0 github.com/nspcc-dev/neofs-contract v0.17.1-0.20230804121740-84ff5d244f69 github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11.0.20230912200451-c0eefd5bd81c github.com/prometheus/client_golang v1.14.0 diff --git a/go.sum b/go.sum index b919ffc..f2c3fda 100644 --- a/go.sum +++ b/go.sum @@ -304,8 +304,8 @@ github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22 h1:n4ZaF github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22/go.mod h1:79bEUDEviBHJMFV6Iq6in57FEOCMcRhfQnfaf0ETA5U= github.com/nspcc-dev/hrw v1.0.9 h1:17VcAuTtrstmFppBjfRiia4K2wA/ukXZhLFS8Y8rz5Y= github.com/nspcc-dev/hrw v1.0.9/go.mod h1:l/W2vx83vMQo6aStyx2AuZrJ+07lGv2JQGlVkPG06MU= -github.com/nspcc-dev/neo-go v0.101.0 h1:JPT2DpZqVjho34TMR59dm6uxvCFttOp02Nm8qCjpfaU= -github.com/nspcc-dev/neo-go v0.101.0/go.mod h1:Q0uWKivGc2mYgdKFmTNP49LeXwMu4x6pUzHm3OIsN2I= +github.com/nspcc-dev/neo-go v0.102.0 h1:O2Gt4JPOWmp0c+PnPWwd2wPI74BKSwkaNCEyvyQTWJw= +github.com/nspcc-dev/neo-go v0.102.0/go.mod h1:QXxpZxJT2KedwM0Nlj8UO0/fZN2WIe4h/i03uBHKbnc= github.com/nspcc-dev/neofs-api-go/v2 v2.14.0 h1:jhuN8Ldqz7WApvUJRFY0bjRXE1R3iCkboMX5QVZhHVk= github.com/nspcc-dev/neofs-api-go/v2 v2.14.0/go.mod h1:DRIr0Ic1s+6QgdqmNFNLIqMqd7lNMJfYwkczlm1hDtM= github.com/nspcc-dev/neofs-contract v0.17.1-0.20230804121740-84ff5d244f69 h1:Vw7WvLxWUwFGDyTnE+x/L8+N7Oo6q9WyRy8YH60juM4=