Skip to content

Commit

Permalink
Merge pull request #50 from Mellanox/dependabot/go_modules/github.com…
Browse files Browse the repository at this point in the history
…/containernetworking/plugins-1.6.2

Bump github.com/containernetworking/plugins from 1.5.0 to 1.6.2
  • Loading branch information
almaslennikov authored Feb 13, 2025
2 parents 121262b + aebb816 commit ed4097d
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 133 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/buildtest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: build
strategy:
matrix:
go-version: [1.20.x]
go-version: [1.23.x]
os: [ubuntu-22.04]
goos: [linux]
goarch: [amd64]
Expand All @@ -35,7 +35,7 @@ jobs:
- name: set up Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version: 1.23.x
- name: check out code into the Go module directory
uses: actions/checkout@v4
- name: run unit-test
Expand All @@ -49,7 +49,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version: 1.23.x
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Go test with coverage
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/static-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
- name: set up Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version: 1.23.x
- name: checkout PR
uses: actions/checkout@v4
- name: run make lint
Expand All @@ -26,7 +26,7 @@ jobs:
- name: set up Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version: 1.23.x
- name: checkout PR
uses: actions/checkout@v4
- name: run make hadolint
Expand Down
16 changes: 9 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,21 @@ linters-settings:
for-loops: false # Report preallocation suggestions on for loops, false by default

linters:
# please, do not use `enable-all`: it's deprecated and will be removed soon.
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
enable:
- bodyclose
- depguard
- dogsled
- dupl
- errcheck
- exportloopref
- copyloopvar
- funlen
- gochecknoinits
- goconst
- gocritic
- gocognit
- gofmt
- goimports
- gomnd
- mnd
- goprintffuncname
- gosec
- gosimple
Expand All @@ -89,8 +86,13 @@ issues:
exclude-rules:
- path: _test\.go
linters:
- gomnd
- revive
- stylecheck
text: "should not use dot imports"
- path: _test\.go
linters:
- mnd
- goconst
- text: "Magic number: 1"
linters:
- gomnd
- mnd
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ GOLANGCI_LINT = $(BINDIR)/golangci-lint
# golangci-lint version should be updated periodically
# we keep it fixed to avoid it from unexpectedly failing on the project
# in case of a version bump
GOLANGCI_LINT_VER = v1.51.2
GOLANGCI_LINT_VER = v1.62.2
TIMEOUT = 15
Q = $(if $(filter 1,$V),,@)

Expand Down
6 changes: 3 additions & 3 deletions cmd/ipoib/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func main() {
return
}

skel.PluginMain(cmdAdd, cmdCheck, cmdDel,
skel.PluginMainFuncs(skel.CNIFuncs{Add: cmdAdd, Check: cmdCheck, Del: cmdDel},
cniversion.All, bv.BuildString("ipoib-cni"))
}

Expand Down Expand Up @@ -233,7 +233,7 @@ func cmdCheck(args *skel.CmdArgs) error {
// Check prevResults for ips, routes and dns against values found in the container
if err := netns.Do(func(_ ns.NetNS) error {
// Check interface against values found in the container
err := validateCniContainerInterface(contIface)
err := validateCniContainerInterface(&contIface)
if err != nil {
return err
}
Expand All @@ -255,7 +255,7 @@ func cmdCheck(args *skel.CmdArgs) error {
return nil
}

func validateCniContainerInterface(iface current.Interface) error {
func validateCniContainerInterface(iface *current.Interface) error {
var link netlink.Link
var err error

Expand Down
23 changes: 13 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
module github.com/Mellanox/ipoib-cni

go 1.20
go 1.23

toolchain go1.23.6

require (
github.com/containernetworking/cni v1.1.2
github.com/containernetworking/plugins v1.5.0
github.com/containernetworking/cni v1.2.3
github.com/containernetworking/plugins v1.6.2
github.com/j-keck/arping v1.0.3
github.com/onsi/ginkgo/v2 v2.19.0
github.com/onsi/gomega v1.33.1
github.com/onsi/ginkgo/v2 v2.22.0
github.com/onsi/gomega v1.36.0
github.com/stretchr/testify v1.10.0
github.com/vishvananda/netlink v1.3.0
)

require (
github.com/coreos/go-iptables v0.7.0 // indirect
github.com/coreos/go-iptables v0.8.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect
github.com/kr/pretty v0.2.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/safchain/ethtool v0.3.0 // indirect
github.com/safchain/ethtool v0.5.9 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/vishvananda/netns v0.0.4 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
golang.org/x/tools v0.26.0 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
sigs.k8s.io/knftables v0.0.18 // indirect
)
Loading

0 comments on commit ed4097d

Please sign in to comment.