From da85d04444034f44914508fbf1e3a7d3e5a93f8d Mon Sep 17 00:00:00 2001 From: 1gtm <1gtm@appscode.com> Date: Mon, 19 Aug 2024 14:15:42 +0000 Subject: [PATCH 1/2] Use Go 1.23 /cherry-pick Signed-off-by: 1gtm <1gtm@appscode.com> --- .github/workflows/ci.yml | 6 +++--- .github/workflows/e2e.yml | 6 +++--- .github/workflows/release-tracker.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/update-docs.yml | 6 +++--- Makefile | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 133c03993..1f5eabe3b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,12 +17,12 @@ concurrency: jobs: build: name: Build - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - - name: Set up Go 1.22 + - name: Set up Go 1.23 uses: actions/setup-go@v1 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/e2e.yml b/.github/workflows/e2e.yml index f564dd313..d2cec45ff 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -18,7 +18,7 @@ concurrency: jobs: build: if: contains(github.event.issue.html_url, '/pull/') && startsWith(github.event.comment.body, '/ok-to-test') - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v1 @@ -52,7 +52,7 @@ jobs: make push config: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: build outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} @@ -82,7 +82,7 @@ jobs: kubernetes: name: Kubernetes needs: config - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: ${{ fromJson(needs.config.outputs.matrix) }} steps: diff --git a/.github/workflows/release-tracker.yml b/.github/workflows/release-tracker.yml index 20712333f..00ea50b59 100644 --- a/.github/workflows/release-tracker.yml +++ b/.github/workflows/release-tracker.yml @@ -12,7 +12,7 @@ concurrency: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f05bbaae1..9e4ffbae0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ concurrency: jobs: build: name: Build - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v1 diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index e78f012e4..53ea3453f 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -14,12 +14,12 @@ concurrency: jobs: build: name: Build - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - - name: Set up Go 1.22 + - name: Set up Go 1.23 uses: actions/setup-go@v1 with: - go-version: '1.22' + go-version: '1.23' id: go - uses: actions/checkout@v1 diff --git a/Makefile b/Makefile index 642e8b131..00ccce0f1 100644 --- a/Makefile +++ b/Makefile @@ -72,7 +72,7 @@ TAG := $(VERSION)_$(OS)_$(ARCH) TAG_PROD := $(TAG) TAG_DBG := $(VERSION)-dbg_$(OS)_$(ARCH) -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 From 5547c0a4536bac785685d3f4f85e0b54f31ba971 Mon Sep 17 00:00:00 2001 From: "Md. Ishtiaq Islam" Date: Tue, 20 Aug 2024 13:56:38 +0600 Subject: [PATCH 2/2] Fix linter issue Signed-off-by: Md. Ishtiaq Islam --- pkg/cmds/create_volumesnapshot.go | 3 +-- pkg/cmds/restore_volumesnapshot.go | 3 +-- test/e2e/framework/minio_server.go | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pkg/cmds/create_volumesnapshot.go b/pkg/cmds/create_volumesnapshot.go index cdba2bbe5..83db13fd3 100644 --- a/pkg/cmds/create_volumesnapshot.go +++ b/pkg/cmds/create_volumesnapshot.go @@ -231,8 +231,7 @@ func (opt *VSoption) createVolumeSnapshot(bsMeta metav1.ObjectMeta, inv invoker. } err := prober.RunProbe(opt.config, targetInfo.Hooks.PostBackup.Handler, podName, opt.namespace) if err != nil { - return nil, fmt.Errorf(err.Error() + "Warning: The actual backup process may be succeeded." + - "Hence, the backup snapshots might be present in the backend even if the overall BackupSession phase is 'Failed'") + return nil, fmt.Errorf("%w Warning: The actual backup process may be succeeded. Hence, the backup snapshots might be present in the backend even if the overall BackupSession phase is 'Failed'", err) } backupOutput.BackupTargetStatus.Conditions = append(backupOutput.BackupTargetStatus.Conditions, kmapi.Condition{ Type: api_v1beta1.PostBackupHookExecutionSucceeded, diff --git a/pkg/cmds/restore_volumesnapshot.go b/pkg/cmds/restore_volumesnapshot.go index fe9813175..b821de58f 100644 --- a/pkg/cmds/restore_volumesnapshot.go +++ b/pkg/cmds/restore_volumesnapshot.go @@ -254,8 +254,7 @@ func (opt *VSoption) restoreVolumeSnapshot(targetInfo invoker.RestoreTargetInfo) } err := prober.RunProbe(opt.config, targetInfo.Hooks.PostRestore.Handler, podName, opt.namespace) if err != nil { - return nil, fmt.Errorf(err.Error() + "Warning: The actual restore process may be succeeded." + - "Hence, the restored data might be present in the target even if the overall RestoreSession phase is 'Failed'") + return nil, fmt.Errorf("%w Warning: The actual restore process may be succeeded. Hence, the restored data might be present in the target even if the overall RestoreSession phase is 'Failed'", err) } klog.Infoln("postRestore hooks has been executed successfully") } diff --git a/test/e2e/framework/minio_server.go b/test/e2e/framework/minio_server.go index dcad428a0..fbdded2e1 100644 --- a/test/e2e/framework/minio_server.go +++ b/test/e2e/framework/minio_server.go @@ -108,7 +108,7 @@ func (f *Framework) SecretForMinioServer(ips []net.IP) core.Secret { return core.Secret{ ObjectMeta: metav1.ObjectMeta{ - Name: fmt.Sprintf(MinioServerSecret + f.namespace), + Name: MinioServerSecret + f.namespace, Namespace: f.namespace, }, Data: map[string][]byte{