From 1765e36f95b6e43a8245ec89ba0a63ff030e52b6 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sun, 20 Sep 2026 18:05:35 +0000 Subject: [PATCH 1/3] CI: Add go 1.27 --- .github/workflows/tests.yml | 17 +++++++++++------ docker/Dockerfile | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 92ccf730c..f94e78110 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ permissions: contents: read env: - latest_go: "1.26.x" + latest_go: "1.27.x" GO111MODULE: on jobs: @@ -23,27 +23,32 @@ jobs: # list of jobs to run: include: - job_name: Windows - go: 1.26.x + go: 1.27.x os: windows-latest - job_name: macOS - go: 1.26.x + go: 1.27.x os: macOS-latest test_fuse: false - job_name: Linux - go: 1.26.x + go: 1.27.x os: ubuntu-latest test_cloud_backends: true test_fuse: true check_changelog: true - job_name: Linux (race) - go: 1.26.x + go: 1.27.x os: ubuntu-latest test_fuse: true test_opts: "-race" + - job_name: Linux + go: 1.26.x + os: ubuntu-latest + test_fuse: true + - job_name: Linux go: 1.25.x os: ubuntu-latest @@ -266,7 +271,7 @@ jobs: uses: golangci/golangci-lint-action@v9 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v2.12 + version: v2.13 args: --verbose --timeout 5m # only run golangci-lint for pull requests, otherwise ALL hints get diff --git a/docker/Dockerfile b/docker/Dockerfile index 22629761f..d9f81ded3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.26-alpine AS builder +FROM golang:1.27-alpine AS builder WORKDIR /go/src/github.com/restic/restic From 1cce3790f441f27cdfd588ebaa66e482d74c38dc Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sun, 20 Sep 2026 21:28:55 +0200 Subject: [PATCH 2/3] gofmt --- internal/backend/s3/s3_test.go | 56 +++++++++++++++++----------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/internal/backend/s3/s3_test.go b/internal/backend/s3/s3_test.go index 962533fd6..8ba76531c 100644 --- a/internal/backend/s3/s3_test.go +++ b/internal/backend/s3/s3_test.go @@ -112,36 +112,36 @@ func newSeaweedFSTestSuite(t testing.TB) (*test.Suite[s3.Config], func()) { cleanup := runSeaweedFS(ctx, t, tempdir, key, secret) return &test.Suite[s3.Config]{ - // NewConfig returns a config for a new temporary backend that will be used in tests. - NewConfig: func() (*s3.Config, error) { - cfg := s3.NewConfig() - cfg.Endpoint = seaweedFSS3Addr - cfg.Bucket = "restictestbucket" - cfg.Prefix = fmt.Sprintf("test-%d", time.Now().UnixNano()) - cfg.UseHTTP = true - cfg.Region = "us-east-1" - cfg.BucketLookup = "path" - cfg.KeyID = key - cfg.Secret = options.NewSecretString(secret) - return &cfg, nil - }, + // NewConfig returns a config for a new temporary backend that will be used in tests. + NewConfig: func() (*s3.Config, error) { + cfg := s3.NewConfig() + cfg.Endpoint = seaweedFSS3Addr + cfg.Bucket = "restictestbucket" + cfg.Prefix = fmt.Sprintf("test-%d", time.Now().UnixNano()) + cfg.UseHTTP = true + cfg.Region = "us-east-1" + cfg.BucketLookup = "path" + cfg.KeyID = key + cfg.Secret = options.NewSecretString(secret) + return &cfg, nil + }, - Factory: location.NewHTTPBackendFactory("s3", s3.ParseConfig, location.NoPassword, func(ctx context.Context, cfg s3.Config, rt http.RoundTripper, errorLog func(string, ...any)) (be backend.Backend, err error) { - for i := range 50 { - be, err = s3.Create(ctx, cfg, rt, errorLog) - if err != nil { - t.Logf("s3 open: try %d: error %v", i, err) - time.Sleep(500 * time.Millisecond) - continue - } - break + Factory: location.NewHTTPBackendFactory("s3", s3.ParseConfig, location.NoPassword, func(ctx context.Context, cfg s3.Config, rt http.RoundTripper, errorLog func(string, ...any)) (be backend.Backend, err error) { + for i := range 50 { + be, err = s3.Create(ctx, cfg, rt, errorLog) + if err != nil { + t.Logf("s3 open: try %d: error %v", i, err) + time.Sleep(500 * time.Millisecond) + continue } - return be, err - }, s3.Open), - }, func() { - defer cancel() - defer cleanup() - } + break + } + return be, err + }, s3.Open), + }, func() { + defer cancel() + defer cleanup() + } } func TestBackendSeaweedFS(t *testing.T) { From 9d17700830448e683aeb0e6d490136dcb2a9e02a Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sun, 20 Sep 2026 22:01:08 +0200 Subject: [PATCH 3/3] update golangci-lint ignore --- .golangci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index b896f9e12..5c2563dbd 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -78,7 +78,7 @@ linters: text: "package-comments: should have a package comment" # staticcheck: there's no easy way to replace these packages - path: (.+)\.go$ - text: 'SA1019: "golang.org/x/crypto/poly1305" is deprecated' + text: 'SA1019: golang.org/x/crypto/poly1305 is deprecated' - path: (.+)\.go$ text: "redefines-builtin-id:" # revive: collection of helpers to implement a backend, more descriptive names would be too repetitive