Skip to content

Commit

Permalink
go mod and vendor update (aws#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 27, 2023
1 parent b2427a4 commit 8f5ddc7
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/[email protected]
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
)
Loading

0 comments on commit 8f5ddc7

Please sign in to comment.