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 golang to version 1.21 on release branch #8103

Closed
wants to merge 3 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/go-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: '1.21'
check-latest: true
cache: true
- name: Run go test with coverage
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.20"
go-version: "1.21"
check-latest: true
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.51.2
version: v1.56.2
only-new-issues: true
# Disable package caching to avoid a double cache with setup-go.
skip-pkg-cache: true
Expand Down
15 changes: 8 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ SHELL := /bin/bash
ARTIFACTS_BUCKET?=my-s3-bucket
GIT_VERSION?=$(shell git describe --tag)
GIT_TAG?=$(shell git tag -l "v*.*.*" --sort -v:refname | head -1)
GOLANG_VERSION?="1.20"
GOLANG_VERSION?="1.21"
GO_VERSION ?= $(shell source ./scripts/common.sh && build::common::get_go_path $(GOLANG_VERSION))
GO ?= $(GO_VERSION)/go
GO_TEST ?= $(GO) test
Expand Down Expand Up @@ -146,8 +146,8 @@ CONTROLLER_MANIFEST_OUTPUT_DIR=$(OUTPUT_DIR)/manifests/cluster-controller
BUILD_TAGS :=
BUILD_FLAGS?=

GO_ARCH:=$(shell go env GOARCH)
GO_OS:=$(shell go env GOOS)
GO_ARCH:=$(shell $(GO) env GOARCH)
GO_OS:=$(shell $(GO) env GOOS)

BINARY_DEPS_DIR = $(OUTPUT_DIR)/dependencies
CLUSTER_CONTROLLER_PLATFORMS ?= linux-amd64 linux-arm64
Expand Down Expand Up @@ -286,13 +286,14 @@ $(KUBEBUILDER): $(TOOLS_BIN_DIR)
chmod +x $(KUBEBUILDER)

$(CONTROLLER_GEN): $(TOOLS_BIN_DIR)
GOBIN=$(TOOLS_BIN_DIR_ABS) go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.1
GOBIN=$(TOOLS_BIN_DIR_ABS) $(GO) install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.1

$(GO_VULNCHECK): $(TOOLS_BIN_DIR)
GOBIN=$(TOOLS_BIN_DIR_ABS) go install golang.org/x/vuln/cmd/govulncheck@latest
GOBIN=$(TOOLS_BIN_DIR_ABS) $(GO) install golang.org/x/vuln/cmd/govulncheck@latest

$(SETUP_ENVTEST): $(TOOLS_BIN_DIR)
cd $(TOOLS_BIN_DIR); $(GO) build -tags=tools -o $(SETUP_ENVTEST_BIN) sigs.k8s.io/controller-runtime/tools/setup-envtest
GOBIN=$(TOOLS_BIN_DIR_ABS) $(GO) install sigs.k8s.io/controller-runtime/tools/setup-envtest@v0.0.0-20240215124517-56159419231e


envtest-setup: $(SETUP_ENVTEST)
$(eval KUBEBUILDER_ASSETS ?= $(shell $(SETUP_ENVTEST) use --use-env -p path --arch $(GO_ARCH) $(KUBEBUILDER_ENVTEST_KUBERNETES_VERSION)))
Expand Down Expand Up @@ -321,7 +322,7 @@ $(TOOLS_BIN_DIR)/gci:

.PHONY: run-gci
run-gci: $(TOOLS_BIN_DIR)/gci ## Run gci against code.
$(LS_FILES_CMD) | xargs $(TOOLS_BIN_DIR)/gci write --skip-generated -s standard,default -s "prefix($(shell go list -m))"
$(LS_FILES_CMD) | xargs $(TOOLS_BIN_DIR)/gci write --skip-generated -s standard,default -s "prefix($(shell $(GO) list -m))"

.PHONY: build-cross-platform
build-cross-platform: eks-a-cross-platform
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/aws/eks-anywhere

go 1.20
go 1.21

require (
github.com/Masterminds/sprig v2.22.0+incompatible
Expand Down
30 changes: 30 additions & 0 deletions go.sum

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions hack/tools/go.mod

This file was deleted.

156 changes: 0 additions & 156 deletions hack/tools/go.sum

This file was deleted.

2 changes: 1 addition & 1 deletion test/e2e/tools/eks-anywhere-test-tool/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/aws/eks-anywhere-test-tool

go 1.20
go 1.21

require (
github.com/aws/aws-sdk-go v1.44.256
Expand Down
Loading
Loading