From 6d3a849c13048a3ee6593b6d4fdc331e397d43f6 Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Thu, 4 Apr 2024 11:09:01 +0000 Subject: [PATCH 1/3] Update to go 1.22 --- Dockerfile | 2 +- go.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ad311b9e5..58af31fbc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21 as builder +FROM golang:1.22 as builder RUN set -ex \ && apt-get update --fix-missing \ && apt-get install -qy --no-install-recommends \ diff --git a/go.mod b/go.mod index 19c43961c..a3e6bf6cd 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/spacemeshos/post -go 1.21 +go 1.22.2 require ( github.com/davecgh/go-spew v1.1.1 From b513bc37bce7900f1441595414c83eee8729a6d3 Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Thu, 4 Apr 2024 11:19:53 +0000 Subject: [PATCH 2/3] Update dependabot to check for docker updates --- .github/dependabot.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index aad738c7e..1403a7f09 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,3 +9,8 @@ updates: directory: "/" schedule: interval: "daily" + + - package-ecosystem: "docker" + directory: "/" + schedule: + interval: "daily" From b0f6eb91c93155e60033319e28b10eee526f9ee7 Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Thu, 4 Apr 2024 11:24:38 +0000 Subject: [PATCH 3/3] Fix linter complaints --- initialization/initialization.go | 3 +-- proving/proving_test.go | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/initialization/initialization.go b/initialization/initialization.go index e59216d14..1223dd580 100644 --- a/initialization/initialization.go +++ b/initialization/initialization.go @@ -364,8 +364,7 @@ func (init *Initializer) Initialize(ctx context.Context) error { defer init.saveMetadata() for i := *init.lastPosition.Load(); i < math.MaxUint64; i += batchSize { - lastPos := i - init.lastPosition.Store(&lastPos) + init.lastPosition.Store(&i) select { case <-ctx.Done(): diff --git a/proving/proving_test.go b/proving/proving_test.go index 07a9dc1af..cd7b5adb2 100644 --- a/proving/proving_test.go +++ b/proving/proving_test.go @@ -32,7 +32,6 @@ func getTestConfig(tb testing.TB) (config.Config, config.InitOpts) { func Test_Generate(t *testing.T) { for numUnits := uint32(1); numUnits < 6; numUnits++ { - numUnits := numUnits t.Run(fmt.Sprintf("numUnits=%d", numUnits), func(t *testing.T) { r := require.New(t) log := zaptest.NewLogger(t, zaptest.Level(zap.DebugLevel))