Skip to content

Commit

Permalink
Update to golang 1.24, bumping multiple dependencies
Browse files Browse the repository at this point in the history
Also update build image manifest, tag file and workflows
  • Loading branch information
cheeseandcereal committed Feb 12, 2025
1 parent c0c9c1b commit dc761c1
Show file tree
Hide file tree
Showing 56 changed files with 1,415 additions and 2,366 deletions.
6 changes: 3 additions & 3 deletions .github/actions/setup-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ runs:
using: "composite"
steps:
- name: Setup Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 #v5.0.0
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 #v5.3.0
with:
go-version: 1.21.x
go-version: ^1.24.0
cache: false
- name: Cache go-build and mod
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 #v4.0.0
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 #v4.2.0
with:
path: |
~/.cache/go-build/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-all-distros-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: |
make generate-always
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf #v6.1.0
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 #v6.2.1
with:
version: v1.24.0
args: --config=.github/.goreleaser-local.yaml --snapshot --skip=publish --clean
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
images: weaveworks/eksctl
- name: Log in to Docker Hub
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 #v3.1.0
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 #v3.3.0
with:
username: weaveworkseksctlci
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ecr-publish-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: ./.github/actions/setup-build

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@4fc4975a852c8cd99761e2de1f4ba73402e44dd9 # v4.0.3
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
with:
aws-region: us-east-1
role-duration-seconds: 7200
Expand All @@ -29,7 +29,7 @@ jobs:

- name: Login to Amazon ECR Public
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v1
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1
with:
registry-type: public

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ecr-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@4fc4975a852c8cd99761e2de1f4ba73402e44dd9 # v4.0.3
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
with:
aws-region: us-east-1
role-duration-seconds: 7200
Expand All @@ -26,7 +26,7 @@ jobs:

- name: Login to Amazon ECR Public
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v1
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1
with:
registry-type: public

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/link-checker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 #v5.3.0
with:
go-version: 1.21.x
go-version: ^1.24.0
cache: false

- name: Install doc dependencies
Expand All @@ -31,6 +31,6 @@ jobs:
run: make build-pages

- name: Link Checker
uses: lycheeverse/lychee-action@f796c8b7d468feb9b8c0a46da3fac0af6874d374 #v2.2.0
uses: lycheeverse/lychee-action@f613c4a64e50d792e0b31ec34bbcbba12263c6a6 #v2.3.0
with:
args: --exclude-all-private --exclude-mail --exclude-file .github/workflows/exclude-file.txt --exclude-path goformation --verbose --no-progress './**/*.md' './**/*.html'
4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:

- name: GoReleaser Release
if: ${{ !inputs.isReleaseCandidate }}
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf #v6.1.0
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 #v6.2.1
with:
version: v1.24.0
args: release --clean --timeout 60m --skip=validate --config=.github/.goreleaser.brew.combined.yml --release-notes="${{env.RELEASE_NOTES_FILE}}"
Expand All @@ -67,7 +67,7 @@ jobs:

- name: GoReleaser Release Candidate
if: ${{ inputs.isReleaseCandidate }}
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf #v6.1.0
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 #v6.2.1
with:
version: v1.24.0
args: release --clean --timeout 60m --skip=validate --config=.github/.goreleaser.yml --release-notes="${{env.RELEASE_NOTES_FILE}}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-candidate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
rc:
name: Push release candidate tag
runs-on: ubuntu-latest
container: public.ecr.aws/eksctl/eksctl-build:6c2690691bd3c017e727553eae863f2cf5c17e67
container: public.ecr.aws/eksctl/eksctl-build:9b9ac54ee74f36fa22be8c7ec24f695dbd4c0d72
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
rc:
name: Push release tag
runs-on: ubuntu-latest
container: public.ecr.aws/eksctl/eksctl-build:6c2690691bd3c017e727553eae863f2cf5c17e67
container: public.ecr.aws/eksctl/eksctl-build:9b9ac54ee74f36fa22be8c7ec24f695dbd4c0d72
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
resource: ["coredns", "aws-node", "nvidia-device-plugin"]
name: Update ${{ matrix.resource }} and open PR
runs-on: ubuntu-latest
container: public.ecr.aws/eksctl/eksctl-build:6c2690691bd3c017e727553eae863f2cf5c17e67
container: public.ecr.aws/eksctl/eksctl-build:9b9ac54ee74f36fa22be8c7ec24f695dbd4c0d72
env:
GOPRIVATE: ""
steps:
Expand All @@ -29,7 +29,7 @@ jobs:
fetch-depth: 0
- name: Configure AWS credentials for coredns update
if: ${{ matrix.resource == 'coredns' }}
uses: aws-actions/configure-aws-credentials@4fc4975a852c8cd99761e2de1f4ba73402e44dd9 # v4.0.3
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
with:
aws-region: us-west-2
role-duration-seconds: 900
Expand Down
39 changes: 1 addition & 38 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# options for analysis running
run:
go: "1.21"
go: "1.24"

# default concurrency is a available CPU number
concurrency: 4
Expand Down Expand Up @@ -66,28 +66,9 @@ linters-settings:
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
# default is false: such cases aren't reported by default.
check-blank: false
govet:
# report about shadowed variables
check-shadowing: false

# Obtain type information from installed (to $GOPATH/pkg) package files:
# golangci-lint will execute `go install -i` and `go test -i` for analyzed packages
# before analyzing them.
# By default this option is disabled and govet gets type information by loader from source code.
# Loading from source code is slow, but it's done only once for all linters.
# Go-installing of packages first time is much slower than loading them from source code,
# therefore this option is disabled by default.
# But repeated installation is fast in go >= 1.10 because of build caching.
# Enable this option only if all conditions are met:
# 1. you use only "fast" linters (--fast e.g.): no program loading occurs
# 2. you use go >= 1.10
# 3. you do repeated runs (false for CI) or cache $GOPATH/pkg or `go env GOCACHE` dir in CI.
use-installed-packages: false
revive:
confidence: 0.8
severity: warning
errorCode: 0
warningCode: 0
rules:
- name: blank-imports
- name: context-as-argument
Expand All @@ -113,9 +94,6 @@ linters-settings:
gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 10
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
dupl:
# tokens count to trigger issue, 150 by default
threshold: 100
Expand All @@ -124,28 +102,13 @@ linters-settings:
min-len: 3
# minimal occurrences count to trigger, 3 by default
min-occurrences: 3
depguard:
list-type: blacklist
include-go-root: false
packages:
- github.com/golang/glog
lll:
# max line length, lines longer will be reported. Default is 120.
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
line-length: 120
# tab width in spaces. Default to 1.
tab-width: 1
unused:
# treat code as a program (not a library) and report unused exported identifiers; default is false.
# XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
# if it's called for subdir of a project it can't find funcs usages. All text editor integrations
# with golangci-lint call it on a directory with the changed file.
check-exported: false
unparam:
# call graph construction algorithm (cha, rta). In general, use cha for libraries,
# and rta for programs with main packages. Default is cha.
algo: cha

# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations
Expand Down
6 changes: 3 additions & 3 deletions .requirements
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
github.com/maxbrunsfeld/counterfeiter/v6
github.com/cloudflare/cfssl/cmd/[email protected].4
github.com/cloudflare/cfssl/cmd/[email protected].4
github.com/cloudflare/cfssl/cmd/[email protected].5
github.com/cloudflare/cfssl/cmd/[email protected].5
github.com/golangci/golangci-lint/cmd/golangci-lint
github.com/onsi/ginkgo/v2/ginkgo@v2.12.1
github.com/onsi/ginkgo/v2/ginkgo@v2.22.2
github.com/vektra/mockery/v2
github.com/github-release/github-release
golang.org/x/tools/cmd/stringer
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_IMAGE=public.ecr.aws/eksctl/eksctl-build:6c2690691bd3c017e727553eae863f2cf5c17e67
ARG BUILD_IMAGE=public.ecr.aws/eksctl/eksctl-build:9b9ac54ee74f36fa22be8c7ec24f695dbd4c0d72
FROM $BUILD_IMAGE as build

WORKDIR /src
Expand Down
2 changes: 1 addition & 1 deletion build/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Make sure to run the following commands after changes to this file are made:
# `make -f Makefile.docker update-build-image-tag && make -f Makefile.docker push-build-image`

FROM golang:1.21.7-alpine3.19@sha256:163801a964d358d6450aeb51b59d5c807d43a7c97fed92cc7ff1be5bd72811ab AS base
FROM public.ecr.aws/docker/library/golang:1.24.0-alpine3.21@sha256:5429efb7de864db15bd99b91b67608d52f97945837c7f6f7d1b779f9bfe46281 AS base

# Add kubectl and aws-iam-authenticator to the PATH
ENV PATH="${PATH}:/out/usr/bin:/out/usr/local/bin"
Expand Down
26 changes: 13 additions & 13 deletions build/docker/build_image_manifest
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
"github.com/maxbrunsfeld/counterfeiter/v6 v6.8.1"
"github.com/cloudflare/cfssl v1.6.4"
"github.com/cloudflare/cfssl v1.6.4"
"github.com/golangci/golangci-lint v1.57.2"
"github.com/onsi/ginkgo/v2 v2.17.1"
"github.com/vektra/mockery/v2 v2.38.0"
"github.com/cloudflare/cfssl v1.6.5"
"github.com/cloudflare/cfssl v1.6.5"
"github.com/golangci/golangci-lint v1.64.2"
"github.com/onsi/ginkgo/v2 v2.22.2"
"github.com/vektra/mockery/v2 v2.52.2"
"github.com/github-release/github-release v0.10.0"
"golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d"
"k8s.io/code-generator v0.29.0"
"k8s.io/code-generator v0.29.0"
"k8s.io/code-generator v0.29.0"
"k8s.io/code-generator v0.29.0"
"k8s.io/code-generator v0.29.0"
"golang.org/x/tools v0.30.0"
"k8s.io/code-generator v0.32.1"
"k8s.io/code-generator v0.32.1"
"k8s.io/code-generator v0.32.1"
"k8s.io/code-generator v0.32.1"
"k8s.io/code-generator v0.32.1"
"sigs.k8s.io/mdtoc v1.1.0"
"github.com/vburenin/ifacemaker v1.2.1"
100644 blob d3ad8df01a6d4b3470b73aa0b7b4d1e2393ac1a6 build/docker/Dockerfile
100644 blob 06375e647bf25352987c7d3105252076c8292e4c .requirements
100644 blob 4110115ebb2fc751cf9a4a04c9c710f5269337ab build/docker/Dockerfile
100644 blob 866aecdf2fd299e1c4355b2d7d8c9decaedbfe19 .requirements
100755 blob c1129ff1ff85ac2c53f908a577675ea59a9325a7 build/scripts/install-build-deps.sh
2 changes: 1 addition & 1 deletion build/docker/image_tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6c2690691bd3c017e727553eae863f2cf5c17e67
9b9ac54ee74f36fa22be8c7ec24f695dbd4c0d72
Loading

0 comments on commit dc761c1

Please sign in to comment.