From db208c1f845bcc1b49d9bc718de9a0e353ee3552 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 3 Jul 2024 09:39:24 +0200 Subject: [PATCH 1/9] user: gofumpt Signed-off-by: Sebastiaan van Stijn --- user/user.go | 1 - 1 file changed, 1 deletion(-) diff --git a/user/user.go b/user/user.go index 984466d1..198c4936 100644 --- a/user/user.go +++ b/user/user.go @@ -197,7 +197,6 @@ func ParseGroupFilter(r io.Reader, filter func(Group) bool) ([]Group, error) { for { var line []byte line, isPrefix, err = rd.ReadLine() - if err != nil { // We should return no error if EOF is reached // without a match. From ab9427524d65ec67aed02e4e8887aa0e8e0807e2 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 3 Jul 2024 09:19:06 +0200 Subject: [PATCH 2/9] ci/gha: remove macos-11 (deprecated), update to macos-12 From the GitHub actions documentation [1]; > The macos-11 label has been deprecated and will no longer be available > after 28 June 2024. [1]: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories Signed-off-by: Sebastiaan van Stijn --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index afc29bb7..86677af8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ jobs: strategy: matrix: go-version: [1.17.x, 1.20.x, 1.21.x] - platform: [ubuntu-20.04, ubuntu-22.04, windows-latest, macos-11] + platform: [ubuntu-20.04, ubuntu-22.04, windows-latest, macos-12] runs-on: ${{ matrix.platform }} steps: - name: Install Go From 2ca03f0e8690843214f695962f3e7ef738293f08 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 3 Jul 2024 09:23:01 +0200 Subject: [PATCH 3/9] ci/gha: bump actions/setup-go to v5 Upgrades Node.js runtime from node16 to node20 Signed-off-by: Sebastiaan van Stijn --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 86677af8..9b92bed4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: runs-on: ${{ matrix.platform }} steps: - name: Install Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} - name: Checkout code From 215242053e6c5dc8daa2beda69149e26a53dea5c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 3 Jul 2024 09:25:04 +0200 Subject: [PATCH 4/9] ci/gha: bump actions/checkout to v4 Only a single commit is fetched by default, for the ref/SHA that triggered the workflow. Set fetch-depth: 0 to fetch all history for all branches and tags. Signed-off-by: Sebastiaan van Stijn --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9b92bed4..9f48b93f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: go mod tidy run: | make tidy From 9c5e9e2d2d473fb5b79d62238ddfd6bf3f53b25f Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 3 Jul 2024 09:29:05 +0200 Subject: [PATCH 5/9] Makefile: bump golangci-lint to v1.59.1 Signed-off-by: Sebastiaan van Stijn --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9005bbc2..14e79bd9 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ lint: $(BINDIR)/golangci-lint done $(BINDIR)/golangci-lint: $(BINDIR) - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(BINDIR) v1.55.1 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(BINDIR) v1.59.1 $(BINDIR): mkdir -p $(BINDIR) From 05d90a30c222516f918e49f2c553e8bd38557882 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 3 Jul 2024 09:32:35 +0200 Subject: [PATCH 6/9] mountinfo: rm unneeded errorlint annotation Commit d6a52098207d17e40c2247f7893626b5e07045f5 removed most errorlint annotations, with one remaining. golangci-lint v1.59.1 comes with errorlint v1.5.2, which contains the fix [1] whitelisting all errno comparisons for errors coming from x/sys/unix. Remove the annotation that is no longer needed. [1]: https://github.com/polyfloyd/go-errorlint/commit/c0e6cac0ec994c118a788505f20fbb20d2b38c11 Signed-off-by: Sebastiaan van Stijn --- mountinfo/mounted_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mountinfo/mounted_linux.go b/mountinfo/mounted_linux.go index e78e7261..58f13c26 100644 --- a/mountinfo/mounted_linux.go +++ b/mountinfo/mounted_linux.go @@ -51,7 +51,7 @@ func mountedByOpenat2(path string) (bool, error) { Resolve: unix.RESOLVE_NO_XDEV, }) _ = unix.Close(dirfd) - switch err { //nolint:errorlint // unix errors are bare + switch err { case nil: // definitely not a mount _ = unix.Close(fd) return false, nil From 83479f07851d885415856bcf3ca8896fee627c47 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 3 Jul 2024 09:46:33 +0200 Subject: [PATCH 7/9] ci/gha: add ubuntu-24.04 (current LTS) Ubuntu 24.04 runners are now available (see [1]) [1]: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories Signed-off-by: Sebastiaan van Stijn --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9f48b93f..6e7f136e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ jobs: strategy: matrix: go-version: [1.17.x, 1.20.x, 1.21.x] - platform: [ubuntu-20.04, ubuntu-22.04, windows-latest, macos-12] + platform: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-latest, macos-12] runs-on: ${{ matrix.platform }} steps: - name: Install Go From 2a29ebe28c920753ebb36cbc79c1b0494cbc417d Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 3 Jul 2024 09:48:29 +0200 Subject: [PATCH 8/9] ci/gha: add macos-14 (m1, arm64) Add current macOS version, running on arm64 (see [1]) [1]: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories Signed-off-by: Sebastiaan van Stijn --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6e7f136e..ae670234 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ jobs: strategy: matrix: go-version: [1.17.x, 1.20.x, 1.21.x] - platform: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-latest, macos-12] + platform: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-latest, macos-12, macos-14] runs-on: ${{ matrix.platform }} steps: - name: Install Go From 057bd48e8e4c03fcb4a6e80583c40b37c719ba8f Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 3 Jul 2024 09:54:24 +0200 Subject: [PATCH 9/9] ci/gha: drop Go 1.20, add Go 1.22 Test with the current stable version of Go; keeping Go 1.17 as lower boundary for now since it costs us little to keep supporting it. Signed-off-by: Sebastiaan van Stijn --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ae670234..c92b3a58 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ jobs: test: strategy: matrix: - go-version: [1.17.x, 1.20.x, 1.21.x] + go-version: [1.17.x, 1.21.x, 1.22.x] platform: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-latest, macos-12, macos-14] runs-on: ${{ matrix.platform }} steps: