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 v1.22 #1671

Merged
merged 2 commits into from
Jun 3, 2024
Merged
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
9 changes: 9 additions & 0 deletions .github/workflows/e2e-fixture-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ jobs:
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Calculate go version
id: vars
run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT

- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ steps.vars.outputs.go_version }}

- name: Build BMO e2e Docker Image
env:
IMG: quay.io/metal3-io/baremetal-operator:e2e
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '1.21'
go-version: '1.22'
- name: Generate release notes
run: |
make release-notes
Expand Down
8 changes: 4 additions & 4 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ linters:
fast: true
linters-settings:
gosec:
go: "1.21"
go: "1.22"
severity: medium
confidence: medium
concurrency: 8
Expand Down Expand Up @@ -87,9 +87,9 @@ linters-settings:
allow-leading-space: false
require-specific: true
staticcheck:
go: "1.21"
go: "1.22"
stylecheck:
go: "1.21"
go: "1.22"
gocritic:
enabled-tags:
- experimental
Expand All @@ -108,7 +108,7 @@ linters-settings:
- whyNoLint
- wrapperFunc
unused:
go: "1.21"
go: "1.22"
issues:
exclude-rules:
- path: test/e2e
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Support FROM override
ARG BUILD_IMAGE=docker.io/golang:1.21.9@sha256:7d0dcbe5807b1ad7272a598fbf9d7af15b5e2bed4fd6c4c2b5b3684df0b317dd
ARG BUILD_IMAGE=docker.io/golang:1.22.2@sha256:450e3822c7a135e1463cd83e51c8e2eb03b86a02113c89424e6f0f8344bb4168
ARG BASE_IMAGE=gcr.io/distroless/static:nonroot@sha256:9ecc53c269509f63c69a266168e4a687c7eb8c0cfd753bd8bfcaa4f58a90876f

# Build the manager binary
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ RUN_NAMESPACE = metal3
GO_TEST_FLAGS = $(TEST_FLAGS)
DEBUG = --debug
COVER_PROFILE = cover.out
GO_VERSION ?= 1.21.9
GO_VERSION ?= 1.22.2

ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))

Expand Down
2 changes: 1 addition & 1 deletion Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def validate_auth():

tilt_helper_dockerfile_header = """
# Tilt image
FROM golang:1.21 as tilt-helper
FROM golang:1.22 as tilt-helper
# Support live reloading with Tilt
RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com/windmilleng/rerun-process-wrapper/master/restart.sh && \
wget --output-document /start.sh --quiet https://raw.githubusercontent.com/windmilleng/rerun-process-wrapper/master/start.sh && \
Expand Down
2 changes: 1 addition & 1 deletion apis/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/metal3-io/baremetal-operator/apis

go 1.21
go 1.22

require (
github.com/google/uuid v1.6.0
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/metal3-io/baremetal-operator

go 1.21
go 1.22

require (
github.com/go-logr/logr v1.4.1
Expand Down
2 changes: 1 addition & 1 deletion hack/e2e/ensure_go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -eux

MINIMUM_GO_VERSION=go1.21.9
MINIMUM_GO_VERSION=go1.22.2

# Ensure the go tool exists and is a viable version, or installs it
verify_go_version()
Expand Down
2 changes: 1 addition & 1 deletion hack/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ else
--volume "${PWD}:/go/src/github.com/metal3-io/baremetal-operator:rw,z" \
--entrypoint sh \
--workdir /go/src/github.com/metal3-io/baremetal-operator \
docker.io/golang:1.21 \
docker.io/golang:1.22 \
/go/src/github.com/metal3-io/baremetal-operator/hack/generate.sh "${@}"
fi;
2 changes: 1 addition & 1 deletion hack/golint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ else
--volume "${PWD}:/go/src/github.com/metal3-io/baremetal-operator:rw,z" \
--entrypoint sh \
--workdir /go/src/github.com/metal3-io/baremetal-operator \
docker.io/golang:1.21 \
docker.io/golang:1.22 \
/go/src/github.com/metal3-io/baremetal-operator/hack/golint.sh "${@}"
fi;
2 changes: 1 addition & 1 deletion hack/gomod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ else
--volume "${PWD}:/workdir:ro,z" \
--entrypoint sh \
--workdir /workdir \
docker.io/golang:1.21 \
docker.io/golang:1.22 \
/workdir/hack/gomod.sh "$@"
fi
2 changes: 1 addition & 1 deletion hack/tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/metal3-io/baremetal-operator/tooling

go 1.21
go 1.22

require (
sigs.k8s.io/controller-tools v0.12.1
Expand Down
2 changes: 1 addition & 1 deletion hack/unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ else
--volume "${PWD}:/go/src/github.com/metal3-io/baremetal-operator:rw,z" \
--entrypoint sh \
--workdir /go/src/github.com/metal3-io/baremetal-operator \
docker.io/golang:1.21 \
docker.io/golang:1.22 \
/go/src/github.com/metal3-io/baremetal-operator/hack/unit.sh "${@}"
fi;
2 changes: 1 addition & 1 deletion pkg/hardwareutils/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/metal3-io/baremetal-operator/pkg/hardwareutils

go 1.21
go 1.22
2 changes: 1 addition & 1 deletion test/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/metal3-io/baremetal-operator/test

go 1.21
go 1.22

require (
github.com/cert-manager/cert-manager v1.10.0
Expand Down