Skip to content

Commit

Permalink
go mod and vendor update (#3534)
Browse files Browse the repository at this point in the history
* go mod and vendor update

* unit test upd

* go mod tidy, go mod vendor on mac

* try to fix windows winio dependency change in docker lib

* hack: fix windows build

* upgrade containernetworking/plugins

* resolve some accidental downgrades

* fix github actions
  • Loading branch information
sparrc committed Jan 30, 2023
1 parent b2427a4 commit b0bfdf3
Show file tree
Hide file tree
Showing 852 changed files with 150,464 additions and 134,508 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: true
path: src/github.com/aws/amazon-ecs-agent
- name: get GO_VERSION
id: get-go-version
Expand All @@ -24,18 +25,14 @@ jobs:
echo "invalid GO version"
exit 1
fi
echo "::set-output name=GO_VERSION::$go_version"
- uses: actions/setup-go@v2
echo "GO_VERSION=$go_version" >> $GITHUB_OUTPUT
- uses: actions/setup-go@v3
with:
go-version: ${{ steps.get-go-version.outputs.GO_VERSION }}
- uses: actions/checkout@v2
with:
submodules: true
path: src/github.com/aws/amazon-ecs-agent
- name: make test
run: |
set -eoux pipefail
export GOPATH=$GITHUB_WORKSPACE
export GO111MODULE=auto
cd $GITHUB_WORKSPACE/src/github.com/aws/amazon-ecs-agent
make test-silent
make analyze-cover-profile
Expand Down
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ xplatform-build:
GOOS=linux GOARCH=arm64 ./scripts/build true "" false
GOOS=windows GOARCH=amd64 ./scripts/build true "" false
# Agent and its dependencies on Go 1.18.x are not compatible with Mac (Darwin).
# Mac is not a supported target platform for Agent, so commenting out
# Mac is not a supported target platform for Agent, so commenting out
# cross-platform build step for Mac temporarily.
# GOOS=darwin GOARCH=amd64 ./scripts/build true "" false

Expand Down Expand Up @@ -149,16 +149,15 @@ ifneq (${BUILD_PLATFORM},aarch64)
endif

test:
${GOTEST} -tags unit -coverprofile cover.out -timeout=60s ./agent/...
cd agent && GO111MODULE=on ${GOTEST} ${VERBOSE} -tags unit -mod vendor -coverprofile ../cover.out -timeout=60s ./... && cd ..
go tool cover -func cover.out > coverprofile.out

test-init:
go test -count=1 -short -v -coverprofile cover.out ./ecs-init/...
go tool cover -func cover.out > coverprofile-init.out

test-silent:
$(eval VERBOSE=)
${GOTEST} -tags unit -coverprofile cover.out -timeout=60s ./agent/...
cd agent && GO111MODULE=on ${GOTEST} -tags unit -mod vendor -coverprofile ../cover.out -timeout=60s ./... && cd ..
go tool cover -func cover.out > coverprofile.out

.PHONY: analyze-cover-profile
Expand Down Expand Up @@ -360,7 +359,6 @@ install-golang:
get-deps: .get-deps-stamp

get-deps-init:
go get golang.org/x/tools/cover
go get github.com/golang/mock/mockgen
cd "${GOPATH}/src/github.com/golang/mock/mockgen" && git checkout 1.3.1 && go get ./... && go install ./... && cd -
GO111MODULE=on go install github.com/fzipp/gocyclo/cmd/gocyclo@v0.3.1
Expand Down
5 changes: 1 addition & 4 deletions agent/config/config_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,7 @@ func validateConfigFile(configFileName string) (bool, error) {
}
defer windows.LocalFree(handle)

id, err := Sid.String()
if err != nil {
return false, err
}
id := Sid.String()

if id == adminSid {
return true, nil
Expand Down
104 changes: 51 additions & 53 deletions agent/go.mod
Original file line number Diff line number Diff line change
@@ -1,75 +1,73 @@
module github.com/aws/amazon-ecs-agent/agent

go 1.12
go 1.19

require (
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/aws/aws-sdk-go v1.36.0
github.com/awslabs/go-config-generator-for-fluentd-and-fluentbit v0.0.0-20190829210224-55d4fd2e6f35
github.com/awslabs/go-config-generator-for-fluentd-and-fluentbit v0.0.0-20210308162251-8959c62cb8f9
github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575
github.com/containerd/cgroups v1.0.4-0.20220221221032-e710ed6ebb1a
github.com/containerd/containerd v1.4.13 // indirect
github.com/containerd/continuity v0.0.0-20181023183536-c220ac4f01b8 // indirect
github.com/containerd/cgroups v1.0.4
github.com/containernetworking/cni v0.8.1
github.com/containernetworking/plugins v0.8.6
github.com/deniswernert/udev v0.0.0-20140626150257-82fe5be8ca5f
github.com/didip/tollbooth v3.0.2+incompatible
github.com/docker/distribution v0.0.0-20181002220433-1cb4180b1a5b // indirect
github.com/docker/docker v0.0.0-20200531234253-77e06fda0c94
github.com/deniswernert/udev v0.0.0-20170418162847-a12666f7b5a1
github.com/didip/tollbooth v4.0.2+incompatible
github.com/docker/docker v17.12.0-ce-rc1.0.20200916142827-bd33bbf0497b+incompatible
github.com/docker/go-connections v0.4.0
github.com/docker/go-units v0.4.0
github.com/fsnotify/fsnotify v1.5.4
github.com/godbus/dbus/v5 v5.0.6 // indirect
github.com/golang/mock v1.6.0
github.com/golang/mock v1.4.1
github.com/gorilla/mux v1.8.0
github.com/gorilla/websocket v1.4.2
github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95
github.com/konsorten/go-windows-terminal-sequences v1.0.1 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/go-digest v1.0.0-rc1 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/pborman/uuid v0.0.0-20150603214016-ca53cad383ca
github.com/pborman/uuid v1.2.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v0.9.4
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4
github.com/prometheus/common v0.4.1
github.com/prometheus/procfs v0.6.0 // indirect
github.com/prometheus/client_golang v1.7.1
github.com/prometheus/client_model v0.2.0
github.com/prometheus/common v0.10.0
github.com/stretchr/testify v1.7.0
github.com/vishvananda/netlink v1.1.0
go.etcd.io/bbolt v1.3.6
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e
golang.org/x/sys v0.0.0-20220624220833-87e55d714810
golang.org/x/tools v0.1.5
google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5 // indirect
google.golang.org/grpc v1.48.0
go.etcd.io/bbolt v1.3.5
golang.org/x/net v0.5.0
golang.org/x/sys v0.4.0
golang.org/x/tools v0.1.12
google.golang.org/grpc v1.52.0
google.golang.org/protobuf v1.28.1
gotest.tools v2.2.0+incompatible // indirect
)

replace (
// Note: the following packages are downgraded explicitly to match the version we were using when we used dep, so that
// dependency change is not coupled with migration to go mod. No other reason to keep them downgraded (if in the
// future we need to downgrade dependency due to other reason, such as incompatibility with newer version, those
// reasons should be noted down separately).
github.com/Microsoft/go-winio => github.com/Microsoft/go-winio v0.4.7
github.com/containernetworking/plugins => github.com/containernetworking/plugins v0.8.6
github.com/coreos/go-systemd => github.com/coreos/go-systemd v0.0.0-20170731111925-d21964639418
github.com/davecgh/go-spew => github.com/davecgh/go-spew v1.1.0
github.com/godbus/dbus => github.com/godbus/dbus v4.1.0+incompatible
github.com/golang/mock => github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129
github.com/golang/protobuf => github.com/golang/protobuf v1.4.1
github.com/jmespath/go-jmespath => github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af
github.com/konsorten/go-windows-terminal-sequences => github.com/konsorten/go-windows-terminal-sequences v1.0.1
github.com/pkg/errors v0.8.1 => github.com/pkg/errors v0.9.1
github.com/prometheus/client_model => github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910
github.com/sirupsen/logrus => github.com/sirupsen/logrus v1.1.1
github.com/stretchr/testify => github.com/stretchr/testify v1.2.2
github.com/vishvananda/netlink => github.com/vishvananda/netlink v0.0.0-20170220200719-fe3b5664d23a
github.com/vishvananda/netns => github.com/vishvananda/netns v0.0.0-20171111001504-be1fbeda1936
golang.org/x/crypto => golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3
golang.org/x/net => golang.org/x/net v0.0.0-20191204025024-5ee1b9f4859a
golang.org/x/sys => golang.org/x/sys v0.0.0-20190830141801-acfa387b8d69
golang.org/x/tools => golang.org/x/tools v0.0.0-20171114152239-bd4635fd2559
require (
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Microsoft/go-winio v0.4.11 // indirect
github.com/Microsoft/hcsshim v0.8.6 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/cilium/ebpf v0.4.0 // indirect
github.com/containerd/containerd v1.4.13 // indirect
github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/godbus/dbus/v5 v5.0.6 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gotestyourself/gotestyourself v1.4.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.25.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/text v0.6.0 // indirect
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gotest.tools v1.4.0 // indirect
)

0 comments on commit b0bfdf3

Please sign in to comment.