From ab44f613b9bdc181f48090468627844a55b10f14 Mon Sep 17 00:00:00 2001 From: Alexander Bayandin Date: Tue, 18 Feb 2025 18:25:08 +0000 Subject: [PATCH 1/3] CI(lint): golangci-lint 1.64.5 --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1654e28af..b00f0738b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,7 +23,7 @@ jobs: with: # Required: the version of golangci-lint is required and # should be specified with patch version. - version: v1.62.2 + version: v1.64.5 args: --timeout 5m github-token: ${{ secrets.GITHUB_TOKEN }} From dbf3214b6b99b469981c02c157ba162d2406c7a0 Mon Sep 17 00:00:00 2001 From: Alexander Bayandin Date: Tue, 18 Feb 2025 18:27:30 +0000 Subject: [PATCH 2/3] CI(golangci-lint): fix nolintlint pkg/reporting/client_azureblob.go:113:39: directive `//nolint:exhaustruct // It's part of Azure SDK` is unused for linter "exhaustruct" (nolintlint) opts := azblob.UploadBufferOptions{} //nolint:exhaustruct // It's part of Azure SDK ^ pkg/reporting/client_azureblobbilling_test.go:82:37: directive `//nolint:exhaustruct // OK for tests` is unused for linter "exhaustruct" (nolintlint) rErr := &azcore.ResponseError{} //nolint:exhaustruct // OK for tests ^ pkg/reporting/client_azureblobbilling_test.go:91:40: directive `//nolint:exhaustruct // OK for tests` is unused for linter "exhaustruct" (nolintlint) &azblob.CreateContainerOptions{}, //nolint:exhaustruct // OK for tests ^ pkg/reporting/client_azureblobbilling_test.go:100:39: directive `//nolint:exhaustruct // OK for tests` is unused for linter "exhaustruct" (nolintlint) &azblob.DownloadBufferOptions{}, //nolint:exhaustruct // OK for tests --- pkg/reporting/client_azureblob.go | 2 +- pkg/reporting/client_azureblobbilling_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/reporting/client_azureblob.go b/pkg/reporting/client_azureblob.go index b998cda05..4502d2b65 100644 --- a/pkg/reporting/client_azureblob.go +++ b/pkg/reporting/client_azureblob.go @@ -110,7 +110,7 @@ func (r *azureRequest) LogFields() zap.Field { func (r *azureRequest) Send(ctx context.Context, payload []byte) SimplifiableError { var err error - opts := azblob.UploadBufferOptions{} //nolint:exhaustruct // It's part of Azure SDK + opts := azblob.UploadBufferOptions{} _, err = r.client.UploadBuffer(ctx, r.cfg.Container, r.key, payload, &opts) if err != nil { return AzureError{Err: err} diff --git a/pkg/reporting/client_azureblobbilling_test.go b/pkg/reporting/client_azureblobbilling_test.go index e3adb4449..c83cd5606 100644 --- a/pkg/reporting/client_azureblobbilling_test.go +++ b/pkg/reporting/client_azureblobbilling_test.go @@ -79,7 +79,7 @@ func TestAzureClient_send(t *testing.T) { require.Error(t, o.err) var azErr AzureError require.ErrorAs(t, o.err, &azErr) - rErr := &azcore.ResponseError{} //nolint:exhaustruct // OK for tests + rErr := &azcore.ResponseError{} require.ErrorAs(t, o.err, &rErr) require.Equal(t, 404, rErr.StatusCode) }, @@ -88,7 +88,7 @@ func TestAzureClient_send(t *testing.T) { name: "can write then read it", when: func(t *testing.T, i *input) { _, err := i.client.client.CreateContainer(i.ctx, i.cfg.Container, - &azblob.CreateContainerOptions{}, //nolint:exhaustruct // OK for tests + &azblob.CreateContainerOptions{}, ) require.NoError(t, err) }, @@ -97,7 +97,7 @@ func TestAzureClient_send(t *testing.T) { b := make([]byte, 1000) const expectedText = "hello, billing data is here" read, err := o.c.client.DownloadBuffer(o.ctx, "test-container", "test-blob-name", b, - &azblob.DownloadBufferOptions{}, //nolint:exhaustruct // OK for tests + &azblob.DownloadBufferOptions{}, ) b = b[0:read] require.NoError(t, err) From 6f3100072d0ab9abfdeb897ecf07183bcc04149b Mon Sep 17 00:00:00 2001 From: Alexander Bayandin Date: Tue, 18 Feb 2025 19:01:24 +0000 Subject: [PATCH 3/3] go 1.24 --- Dockerfile.go-base | 2 +- go.mod | 2 +- neonvm/hack/Dockerfile.generate | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile.go-base b/Dockerfile.go-base index 4b72833ab..22ad3e42f 100644 --- a/Dockerfile.go-base +++ b/Dockerfile.go-base @@ -1,6 +1,6 @@ # Base image for go dependencies, to speed up builds when they haven't changed. # For more, see https://github.com/neondatabase/go-chef -FROM golang:1.23-alpine AS chef +FROM golang:1.24-alpine AS chef ARG GO_CHEF_VERSION=v0.1.0 RUN go install github.com/neondatabase/go-chef@$GO_CHEF_VERSION diff --git a/go.mod b/go.mod index 6aa0bdd15..d3d30e177 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/neondatabase/autoscaling -go 1.23.0 +go 1.24.0 replace ( github.com/google/gnostic => github.com/google/gnostic v0.7.0 diff --git a/neonvm/hack/Dockerfile.generate b/neonvm/hack/Dockerfile.generate index da48c25a0..e1613f81f 100644 --- a/neonvm/hack/Dockerfile.generate +++ b/neonvm/hack/Dockerfile.generate @@ -1,4 +1,4 @@ -FROM golang:1.23 +FROM golang:1.24 RUN apt-get update && apt-get install -y patch