From 89733cd055f3094f97479ff8f7d65d759df855ab Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 8 Feb 2022 19:26:43 -0800 Subject: [PATCH 1/3] Format sources using gofumpt 0.2.1 ... which adds a wee more whitespace fixes. Signed-off-by: Kir Kolyshkin --- libcontainer/cgroups/ebpf/devicefilter/devicefilter_test.go | 3 +-- libcontainer/process_linux.go | 4 ---- update.go | 2 -- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/libcontainer/cgroups/ebpf/devicefilter/devicefilter_test.go b/libcontainer/cgroups/ebpf/devicefilter/devicefilter_test.go index a8fc562d038..d279335821d 100644 --- a/libcontainer/cgroups/ebpf/devicefilter/devicefilter_test.go +++ b/libcontainer/cgroups/ebpf/devicefilter/devicefilter_test.go @@ -153,8 +153,7 @@ func TestDeviceFilter_Privileged(t *testing.T) { Allow: true, }, } - expected := - ` + expected := ` // load parameters into registers 0: LdXMemW dst: r2 src: r1 off: 0 imm: 0 1: And32Imm dst: r2 imm: 65535 diff --git a/libcontainer/process_linux.go b/libcontainer/process_linux.go index ae91d5b900f..c2ee2da6b13 100644 --- a/libcontainer/process_linux.go +++ b/libcontainer/process_linux.go @@ -39,13 +39,9 @@ type parentProcess interface { // startTime returns the process start time. startTime() (uint64, error) - signal(os.Signal) error - externalDescriptors() []string - setExternalDescriptors(fds []string) - forwardChildLogs() chan error } diff --git a/update.go b/update.go index d02e7af90d3..9ce5a2e835b 100644 --- a/update.go +++ b/update.go @@ -194,7 +194,6 @@ other options are ignored. opt string dest *uint64 }{ - {"cpu-period", r.CPU.Period}, {"cpu-rt-period", r.CPU.RealtimePeriod}, {"cpu-share", r.CPU.Shares}, @@ -211,7 +210,6 @@ other options are ignored. opt string dest *int64 }{ - {"cpu-quota", r.CPU.Quota}, {"cpu-rt-runtime", r.CPU.RealtimeRuntime}, } { From f7d461349299a19a3e2f487792fd74e52480d1a5 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 8 Feb 2022 19:28:24 -0800 Subject: [PATCH 2/3] ci: bump golangci-lint to v1.44 Also, remove "must be specified without patch version" as this is no longer true. Signed-off-by: Kir Kolyshkin --- .github/workflows/validate.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 055340640f2..a6dd3c7dc59 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -20,8 +20,7 @@ jobs: sudo apt -q install libseccomp-dev - uses: golangci/golangci-lint-action@v2 with: - # must be specified without patch version - version: v1.42 + version: v1.44 lint-extra: # Extra linters, only checking new code from pull requests. @@ -39,8 +38,7 @@ jobs: with: only-new-issues: true args: --config .golangci-extra.yml - # must be specified without patch version - version: v1.43 + version: v1.44 compile-buildtags: From f7637defb8e18ec2ab592172acb16856b53a577f Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Mon, 28 Feb 2022 17:54:33 -0800 Subject: [PATCH 3/3] ci: use golangci-lint-action v3, GO_VERSION golangci-lint-action v3 no longer installs golang itself, and the version that comes with Ubuntu is not new/good enough. Install go 1.17.x explicitly. Introduce GO_VERSION environment variable to avoid duplication, and use it instead of 1.x in other places, so that implicit go update won't bring some unexpected failures. Signed-off-by: Kir Kolyshkin --- .github/workflows/validate.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index a6dd3c7dc59..74cc90b14ff 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -7,6 +7,8 @@ on: - master - release-* pull_request: +env: + GO_VERSION: 1.17.x jobs: @@ -14,11 +16,14 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 + - uses: actions/setup-go@v2 + with: + go-version: "${{ env.GO_VERSION }}" - name: install deps run: | sudo apt -q update sudo apt -q install libseccomp-dev - - uses: golangci/golangci-lint-action@v2 + - uses: golangci/golangci-lint-action@v3 with: version: v1.44 @@ -30,11 +35,14 @@ jobs: contents: read steps: - uses: actions/checkout@v3 + - uses: actions/setup-go@v2 + with: + go-version: "${{ env.GO_VERSION }}" - name: install deps run: | sudo apt -q update sudo apt -q install libseccomp-dev - - uses: golangci/golangci-lint-action@v2 + - uses: golangci/golangci-lint-action@v3 with: only-new-issues: true args: --config .golangci-extra.yml @@ -51,7 +59,7 @@ jobs: - name: install go uses: actions/setup-go@v2 with: - go-version: 1.x # Latest stable + go-version: "${{ env.GO_VERSION }}" - name: compile with no build tags run: make BUILDTAGS="" @@ -118,7 +126,7 @@ jobs: - name: install go uses: actions/setup-go@v2 with: - go-version: 1.x # Latest stable + go-version: "${{ env.GO_VERSION }}" - name: cache go mod and $GOCACHE uses: actions/cache@v2 with: