From 36516c28c2be17c983d9131a25ba34609e7643ea Mon Sep 17 00:00:00 2001 From: lgtm <1gtm@users.noreply.github.com> Date: Sat, 17 Aug 2024 02:01:43 -0700 Subject: [PATCH] Use Go 1.23 (#222) /cherry-pick Signed-off-by: 1gtm <1gtm@appscode.com> Signed-off-by: Tamal Saha --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- .github/workflows/update-crds.yaml | 4 ++-- Makefile | 2 +- pkg/util/backup.go | 3 ++- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9dd5399a..cbf1530d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,10 +18,10 @@ jobs: name: Build runs-on: ubuntu-22.04 steps: - - name: Set up Go 1.22 + - name: Set up Go 1.23 uses: actions/setup-go@v2 with: - go-version: '1.22' + go-version: '1.23' id: go - name: Check out code into the Go module directory diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5ab5828c0..9f752803d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,10 +18,10 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v1 - - name: Set up Go 1.22 + - name: Set up Go 1.23 uses: actions/setup-go@v2 with: - go-version: '1.22' + go-version: '1.23' id: go - name: Print version info diff --git a/.github/workflows/update-crds.yaml b/.github/workflows/update-crds.yaml index 6b8ec9791..25867715c 100644 --- a/.github/workflows/update-crds.yaml +++ b/.github/workflows/update-crds.yaml @@ -15,10 +15,10 @@ jobs: name: Build runs-on: ubuntu-22.04 steps: - - name: Set up Go 1.22 + - name: Set up Go 1.23 uses: actions/setup-go@v2 with: - go-version: '1.22' + go-version: '1.23' id: go - uses: actions/checkout@v1 diff --git a/Makefile b/Makefile index cebd12a9f..846a40e87 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,7 @@ ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH)) BASEIMAGE_PROD ?= gcr.io/distroless/static-debian12 BASEIMAGE_DBG ?= debian:bookworm -GO_VERSION ?= 1.22 +GO_VERSION ?= 1.23 BUILD_IMAGE ?= ghcr.io/appscode/golang-dev:$(GO_VERSION) TEST_IMAGE ?= ghcr.io/appscode/golang-dev:$(GO_VERSION)-stash diff --git a/pkg/util/backup.go b/pkg/util/backup.go index 6dd49a9aa..e866ef80d 100644 --- a/pkg/util/backup.go +++ b/pkg/util/backup.go @@ -18,6 +18,7 @@ package util import ( "context" + "errors" "fmt" "time" @@ -91,7 +92,7 @@ func IsRepositoryInitialized(opt ActionOptions) (bool, error) { // If the condition is present but it is set to "False", then the repository initialization has failed. Possibly due to invalid backend / storage secret. if !cutil.IsConditionTrue(backupSession.Status.Conditions, v1beta1.BackendRepositoryInitialized) { _, cnd := cutil.GetCondition(backupSession.Status.Conditions, v1beta1.BackendRepositoryInitialized) - return false, fmt.Errorf(cnd.Reason) + return false, errors.New(cnd.Reason) } return true, nil }