Skip to content

Commit

Permalink
Update Go version to 1.18 (#3100)
Browse files Browse the repository at this point in the history
* Add doc for Go version update process
* Add entry to changelog about SHA-1 signed certs deprecation
  • Loading branch information
g-gaston authored Aug 24, 2022
1 parent c88e3c6 commit de2b68e
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 12 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/go-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: 1.17.8
go-version: '1.18'
check-latest: true
cache: true
- name: Run go test with coverage
run: COVER_PROFILE=coverage.txt make coverage-unit-test
- name: Codecov upload
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.17.8
- uses: actions/checkout@v2
- uses: actions/setup-go@v3
with:
go-version: '1.18'
check-latest: true
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
version: v1.45.2
skip-go-installation: true
2 changes: 1 addition & 1 deletion 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 --sort -v:refname | head -1)
GOLANG_VERSION?="1.17"
GOLANG_VERSION?="1.18"
GO_VERSION ?= $(shell source ./scripts/common.sh && build::common::get_go_path $(GOLANG_VERSION))
GO ?= $(GO_VERSION)/go
GO_TEST ?= $(GO) test
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.1-experimental

# Build the manager binary
FROM golang:1.17.8 as builder
FROM golang:1.18.5 as builder
WORKDIR /workspace

# Run this with docker build --build_arg $(go env GOPROXY) to override the goproxy
Expand Down
7 changes: 5 additions & 2 deletions cmd/eksctl-anywhere/cmd/listovas.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/spf13/viper"
"golang.org/x/text/cases"
"golang.org/x/text/language"
"sigs.k8s.io/yaml"

eksav1alpha1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1"
Expand Down Expand Up @@ -58,11 +60,12 @@ func listOvas(context context.Context, spec string) error {

bundle := clusterSpec.VersionsBundle

titler := cases.Title(language.English)
for _, ova := range bundle.Ovas() {
if strings.Contains(ova.URI, string(eksav1alpha1.Bottlerocket)) {
fmt.Printf("%s:\n", strings.Title(string(eksav1alpha1.Bottlerocket)))
fmt.Printf("%s:\n", titler.String(string(eksav1alpha1.Bottlerocket)))
} else {
fmt.Printf("%s:\n", strings.Title(string(eksav1alpha1.Ubuntu)))
fmt.Printf("%s:\n", titler.String(string(eksav1alpha1.Ubuntu)))
}
output := listOvasOutput{
URI: ova.URI,
Expand Down
5 changes: 5 additions & 0 deletions docs/content/en/docs/reference/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ linkTitle: "What's New?"
weight: 35
---

## Unreleased

### ⚠️ Breaking changes
- Certificates signed with SHA-1 are not supported anymore for Registry Mirror. Users with a registry mirror and providing a custom CA cert will need to rotate the certificate served by the registry mirror endpoint before using the new EKS-A version. This is true for both new clusters (`create cluster` command) and existing clusters (`upgrade cluster` command).

## [v0.11.0](https://github.com/aws/eks-anywhere/releases/tag/v0.11.0)

### Breaking Changes
Expand Down
2 changes: 2 additions & 0 deletions docs/developer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
[Pull Request Guidelines](pull-requests.md)

[Issue Management](issues.md)

[Go Version](go-version.md)
10 changes: 10 additions & 0 deletions docs/developer/go-version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Go version

## How to update the repo's Go Version

1. Make sure the [image builder](https://github.com/aws/eks-anywhere-build-tooling/blob/main/build/lib/install_go_versions.sh#L37) supports the new Go minor version. If it doesn't, you will need to add it there first.
1. Update `GOLANG_VERSION` in the [main `Makefile`](https://github.com/aws/eks-anywhere/blob/main/Makefile#L23)
1. Update `GOLANG_VERSION` in the [`release` `Makefile`](https://github.com/aws/eks-anywhere/blob/main/release/Makefile#L45)
1. Update `go-version` in [`codecov` workflow](https://github.com/aws/eks-anywhere/blob/main/.github/workflows/go-coverage.yml#L17)
1. Update `go-version` in [`golangci-lint` workflow](https://github.com/aws/eks-anywhere/blob/main/.github/workflows/golangci-lint.yml#L17)
1. Update the base image in the [controller's `Dockerfile`](https://github.com/aws/eks-anywhere/blob/main/build/Dockerfile#L4)
2 changes: 1 addition & 1 deletion release/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ GOBIN=$(shell go env GOBIN)
endif

# Setup Go
GOLANG_VERSION?="1.17"
GOLANG_VERSION?="1.18"
GO_VERSION ?= $(shell source ../scripts/common.sh && build::common::get_go_path $(GOLANG_VERSION))
GO ?= $(GO_VERSION)/go

Expand Down

0 comments on commit de2b68e

Please sign in to comment.