From b3b061ad9c2b868e39afa9011842346e55c24c1b Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 15 Aug 2022 15:51:04 +0300 Subject: [PATCH 1/4] [#412] go.mod: Update neofs-crypto dependency Fix panic in signature marshaling. Signed-off-by: Evgenii Stratonikov --- go.mod | 2 +- go.sum | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 830c3595..084e6392 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/nspcc-dev/neofs-api-go/v2 go 1.16 require ( - github.com/nspcc-dev/neofs-crypto v0.3.0 + github.com/nspcc-dev/neofs-crypto v0.4.0 github.com/stretchr/testify v1.7.0 google.golang.org/grpc v1.41.0 google.golang.org/protobuf v1.27.1 diff --git a/go.sum b/go.sum index daed05b9..2a0ec49d 100644 --- a/go.sum +++ b/go.sum @@ -41,20 +41,17 @@ github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/mr-tron/base58 v1.1.2 h1:ZEw4I2EgPKDJ2iEw0cNmLB3ROrEmkOtXIkaG7wZg+78= -github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/nspcc-dev/neofs-crypto v0.3.0 h1:zlr3pgoxuzrmGCxc5W8dGVfA9Rro8diFvVnBg0L4ifM= -github.com/nspcc-dev/neofs-crypto v0.3.0/go.mod h1:8w16GEJbH6791ktVqHN9YRNH3s9BEEKYxGhlFnp0cDw= +github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= +github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/nspcc-dev/neofs-crypto v0.4.0 h1:5LlrUAM5O0k1+sH/sktBtrgfWtq1pgpDs09fZo+KYi4= +github.com/nspcc-dev/neofs-crypto v0.4.0/go.mod h1:6XJ8kbXgOfevbI2WMruOtI+qUJXNwSGM/E9eClXxPHs= github.com/nspcc-dev/rfc6979 v0.2.0 h1:3e1WNxrN60/6N0DW7+UYisLeZJyfqZTNOjeV/toYvOE= github.com/nspcc-dev/rfc6979 v0.2.0/go.mod h1:exhIh1PdpDC5vQmyEsGvc4YDM/lyQp/452QxGq/UEso= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= From 3a7857e9ee56e3188d889da01fb325405ec41a3a Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 15 Aug 2022 15:53:37 +0300 Subject: [PATCH 2/4] [#412] go.mod: Update minimal go version to 1.17 Also, update github actions accordingly. Signed-off-by: Evgenii Stratonikov --- .github/workflows/go.yml | 2 +- go.mod | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 3c9eb3c3..6fada0f1 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - go: [ '1.16.x', '1.17.x' ] + go: [ '1.17.x', '1.18.x', '1.19.x' ] steps: - name: Setup go uses: actions/setup-go@v2 diff --git a/go.mod b/go.mod index 084e6392..0dbdda4c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/nspcc-dev/neofs-api-go/v2 -go 1.16 +go 1.17 require ( github.com/nspcc-dev/neofs-crypto v0.4.0 @@ -9,6 +9,19 @@ require ( google.golang.org/protobuf v1.27.1 ) +require ( + github.com/davecgh/go-spew v1.1.0 // indirect + github.com/golang/protobuf v1.5.0 // indirect + github.com/mr-tron/base58 v1.2.0 // indirect + github.com/nspcc-dev/rfc6979 v0.2.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + golang.org/x/net v0.0.0-20200822124328-c89045814202 // indirect + golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd // indirect + golang.org/x/text v0.3.0 // indirect + google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect + gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect +) + // This version uses broken NeoFS API with incompatible signature // definitions. See fix in https://github.com/nspcc-dev/neofs-api/pull/203 retract v2.12.0 From d6110189b4d8b7e1af5b8f5f2dcba600397ba18f Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 15 Aug 2022 15:57:06 +0300 Subject: [PATCH 3/4] [#412] .github: Update actions to the latest version Signed-off-by: Evgenii Stratonikov --- .github/workflows/go.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 6fada0f1..48e770c4 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -20,15 +20,15 @@ jobs: go: [ '1.17.x', '1.18.x', '1.19.x' ] steps: - name: Setup go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: ${{ matrix.go }} - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Cache go mod - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('**/go.sum') }} @@ -49,11 +49,16 @@ jobs: lint: runs-on: ubuntu-20.04 steps: + - name: Setup go + uses: actions/setup-go@v3 + with: + go-version: 1.19 + - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: golangci-lint - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@v3 with: - version: v1.42.1 + version: v1.48.0 only-new-issues: true From 0a941871adf8fd3621baff66548b185a5122efb4 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 15 Aug 2022 16:17:10 +0300 Subject: [PATCH 4/4] [#412] storagegroup: Remove linter warning Signed-off-by: Evgenii Stratonikov --- storagegroup/convert.go | 1 + 1 file changed, 1 insertion(+) diff --git a/storagegroup/convert.go b/storagegroup/convert.go index 489dad3d..b36101ff 100644 --- a/storagegroup/convert.go +++ b/storagegroup/convert.go @@ -50,6 +50,7 @@ func (s *StorageGroup) FromGRPCMessage(m grpc.Message) error { return err } + //nolint: staticcheck s.exp = v.GetExpirationEpoch() s.size = v.GetValidationDataSize()