Skip to content

Commit

Permalink
Merge pull request #3472 from kolyshkin/1.1-fix-fedora-ci-git
Browse files Browse the repository at this point in the history
[1.1] Make CI green again
  • Loading branch information
thaJeztah committed May 12, 2022
2 parents 8acb6a0 + bf1cd88 commit b507e2d
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
steps:

- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: install deps
if: matrix.criu == ''
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
steps:

- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: install deps
run: |
Expand Down
40 changes: 23 additions & 17 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,25 @@ on:
- master
- release-*
pull_request:
env:
GO_VERSION: 1.17.x

jobs:

lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- 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:
# must be specified without patch version
version: v1.42
version: v1.44

lint-extra:
# Extra linters, only checking new code from pull requests.
Expand All @@ -30,17 +34,19 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v2
- 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
# must be specified without patch version
version: v1.43
version: v1.44


compile-buildtags:
Expand All @@ -49,18 +55,18 @@ jobs:
# Don't ignore C warnings. Note that the output of "go env CGO_CFLAGS" by default is "-g -O2", so we keep them.
CGO_CFLAGS: -g -O2 -Werror
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- 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=""

codespell:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: install deps
# Version of codespell bundled with Ubuntu is way old, so use pip.
run: pip install codespell
Expand All @@ -70,7 +76,7 @@ jobs:
shfmt:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: vars
run: |
echo "VERSION=3.3.1" >> $GITHUB_ENV
Expand All @@ -93,7 +99,7 @@ jobs:
shellcheck:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: vars
run: |
echo 'VERSION=v0.7.2' >> $GITHUB_ENV
Expand All @@ -116,11 +122,11 @@ jobs:
deps:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- 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:
Expand Down Expand Up @@ -156,7 +162,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: install deps
Expand All @@ -173,7 +179,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
# We have to run this under Docker as Ubuntu (host) does not support all
Expand Down
3 changes: 3 additions & 0 deletions Vagrantfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ EOF
done
dnf clean all
# Prevent the "fatal: unsafe repository" git complain during build.
git config --global --add safe.directory /vagrant
# Add a user for rootless tests
useradd -u2000 -m -d/home/rootless -s/bin/bash rootless
Expand Down
3 changes: 1 addition & 2 deletions libcontainer/cgroups/ebpf/devicefilter/devicefilter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion libcontainer/factory_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,12 @@ func (l *LinuxFactory) StartInitialization() (err error) {

defer func() {
if e := recover(); e != nil {
err = fmt.Errorf("panic from initialization: %w, %v", e, string(debug.Stack()))
if e, ok := e.(error); ok {
err = fmt.Errorf("panic from initialization: %w, %s", e, debug.Stack())
} else {
//nolint:errorlint // here e is not of error type
err = fmt.Errorf("panic from initialization: %v, %s", e, debug.Stack())
}
}
}()

Expand Down
4 changes: 0 additions & 4 deletions libcontainer/process_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 0 additions & 2 deletions update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand All @@ -211,7 +210,6 @@ other options are ignored.
opt string
dest *int64
}{

{"cpu-quota", r.CPU.Quota},
{"cpu-rt-runtime", r.CPU.RealtimeRuntime},
} {
Expand Down

0 comments on commit b507e2d

Please sign in to comment.