Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump containernetworking dependencies only #916

Merged
merged 1 commit into from
Apr 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ generate-limits:
go run pkg/awsutils/gen_vpc_ip_limits.go

# Fetch portmap the port-forwarding management CNI plugin
portmap: FETCH_VERSION=0.7.5
portmap: FETCH_URL=https:/containernetworking/plugins/releases/download/v$(FETCH_VERSION)/cni-plugins-$(GOARCH)-v$(FETCH_VERSION).tgz
portmap: FETCH_VERSION=0.8.5
portmap: FETCH_URL=https:/containernetworking/plugins/releases/download/v$(FETCH_VERSION)/cni-plugins-$(GOOS)-$(GOARCH)-v$(FETCH_VERSION).tgz
portmap: VISIT_URL=https:/containernetworking/plugins/tree/v$(FETCH_VERSION)/plugins/meta/portmap
portmap:
@echo "Fetching portmap CNI plugin v$(FETCH_VERSION) from upstream release"
Expand Down
3 changes: 2 additions & 1 deletion cmd/routed-eni-cni-plugin/cni.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,9 @@ func del(args *skel.CmdArgs, cniTypes typeswrapper.CNITYPES, grpcClient grpcwrap
func main() {
log := logger.DefaultLogger()
log.Infof("CNI Plugin version: %s ...", version)
about := fmt.Sprintf("AWS CNI %s", version)
exitCode := 0
if e := skel.PluginMainWithError(cmdAdd, cmdDel, cniSpecVersion.All); e != nil {
if e := skel.PluginMainWithError(cmdAdd, nil, cmdDel, cniSpecVersion.All, about); e != nil {
if err := e.Print(); err != nil {
log.Errorf("Failed to write error to stdout: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/routed-eni-cni-plugin/driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/pkg/errors"
"golang.org/x/sys/unix"

"github.com/containernetworking/cni/pkg/ns"
"github.com/containernetworking/plugins/pkg/ns"
"github.com/vishvananda/netlink"

"github.com/aws/amazon-vpc-cni-k8s/pkg/ipwrapper"
Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ go 1.13
require (
github.com/aws/aws-sdk-go v1.30.4
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 // indirect
github.com/containernetworking/cni v0.5.2
github.com/containernetworking/cni v0.7.1
github.com/containernetworking/plugins v0.8.5
github.com/coreos/go-iptables v0.4.5
github.com/ghodss/yaml v1.0.0 // indirect
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect
Expand All @@ -15,7 +16,7 @@ require (
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf // indirect
github.com/googleapis/gnostic v0.2.0 // indirect
github.com/gregjones/httpcache v0.0.0-20190212212710-3befbb6ad0cc // indirect
github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47 // indirect
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\o/ always good to get rid of older non-semver deps.

github.com/hashicorp/golang-lru v0.5.1 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/json-iterator/go v1.1.5 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
Expand Down
59 changes: 35 additions & 24 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pkg/cninswrapper/mock_ns/netns_mocks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/cninswrapper/mocks/cninswrapper_mocks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/cninswrapper/ns.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

package cninswrapper

import "github.com/containernetworking/cni/pkg/ns"
import "github.com/containernetworking/plugins/pkg/ns"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have all these packages moved under plugins directory now ? Looking at this PR in isolation is not giving me that insight. Can we still continue to use cni directory packages ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The upstream package was moved in v0.6.0 back in August 2017, so we have to import the files from where they are now.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarification. Lets run integration changes post this at least once again before the release.


// NS wraps methods used from the cni/pkg/ns package
type NS interface {
Expand Down
4 changes: 2 additions & 2 deletions pkg/ipamd/ipamd.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,13 @@ var (
addIPCnt = prometheus.NewCounter(
prometheus.CounterOpts{
Name: "awscni_add_ip_req_count",
Help: "The number of add IP address request",
Help: "The number of add IP address requests",
},
)
delIPCnt = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "awscni_del_ip_req_count",
Help: "The number of delete IP address request",
Help: "The number of delete IP address requests",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change primarily for readability ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sentence was not correct.

},
[]string{"reason"},
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/ipwrapper/ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package ipwrapper
import (
"net"

"github.com/containernetworking/cni/pkg/ip"
"github.com/containernetworking/plugins/pkg/ip"
"github.com/vishvananda/netlink"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/nswrapper/mocks/nswrapper_mocks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/nswrapper/ns.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package nswrapper

import (
"github.com/containernetworking/cni/pkg/ns"
"github.com/containernetworking/plugins/pkg/ns"
)

type NS interface {
Expand Down