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

Update GO_VERSION to 1.18.3 #3301

Merged
merged 13 commits into from
Jul 23, 2022
2 changes: 1 addition & 1 deletion GO_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.17.5
1.18.3
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ static-with-pause:
xplatform-build:
GOOS=linux GOARCH=arm64 ./scripts/build true "" false
GOOS=windows GOARCH=amd64 ./scripts/build true "" false
GOOS=darwin 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
# cross-platform build step for Mac temporarily.
# GOOS=darwin GOARCH=amd64 ./scripts/build true "" false

BUILDER_IMAGE="amazon/amazon-ecs-agent-build:make"
.builder-image-stamp: scripts/dockerfiles/Dockerfile.build
Expand Down Expand Up @@ -340,8 +343,8 @@ GOPATH=$(shell go env GOPATH)
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 -
go get golang.org/x/tools/cmd/goimports
GO111MODULE=on go get github.com/fzipp/gocyclo/cmd/[email protected]
GO111MODULE=on go get honnef.co/go/tools/cmd/staticcheck@v0.2.1
GO111MODULE=on go install github.com/fzipp/gocyclo/cmd/[email protected]
GO111MODULE=on go install honnef.co/go/tools/cmd/staticcheck@v0.3.2
touch .get-deps-stamp

get-deps: .get-deps-stamp
Expand All @@ -351,9 +354,9 @@ get-deps-init:
go get golang.org/x/tools/cmd/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 get github.com/fzipp/gocyclo/cmd/[email protected]
GO111MODULE=on go install github.com/fzipp/gocyclo/cmd/[email protected]
go get golang.org/x/tools/cmd/goimports
GO111MODULE=on go get honnef.co/go/tools/cmd/staticcheck@v0.2.1
GO111MODULE=on go install honnef.co/go/tools/cmd/staticcheck@v0.3.2

amazon-linux-sources.tgz:
./scripts/update-version.sh
Expand Down
4 changes: 0 additions & 4 deletions agent/credentials/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,10 @@ type IAMRoleCredentials struct {
type TaskIAMRoleCredentials struct {
ARN string
IAMRoleCredentials IAMRoleCredentials
lock sync.RWMutex
Copy link
Member

Choose a reason for hiding this comment

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

note: This lock is likely redundant. There's a taskCredentialsLock which is managing the writes and reads and the usage for this lock is only on reads but is covered by the other outer lock. Approving

}

// GetIAMRoleCredentials returns the IAM role credentials in the task IAM role struct
func (role *TaskIAMRoleCredentials) GetIAMRoleCredentials() IAMRoleCredentials {
role.lock.RLock()
defer role.lock.RUnlock()

return role.IAMRoleCredentials
}

Expand Down