diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 75bb609f..231de300 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -56,7 +56,7 @@ jobs: uses: golangci/golangci-lint-action@v6 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.55 + version: v1.63 # Optional: golangci-lint command line arguments. args: --config=.golangci.yml diff --git a/Dockerfile b/Dockerfile index e9859f8f..849f49a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.22 AS builder +FROM golang:1.23 AS builder ARG TARGETOS ARG TARGETARCH diff --git a/api/go.mod b/api/go.mod index 8899841f..070404b8 100644 --- a/api/go.mod +++ b/api/go.mod @@ -1,8 +1,6 @@ module github.com/ceph/ceph-csi-operator/api -go 1.22.0 - -toolchain go1.22.5 +go 1.23.0 require ( k8s.io/api v0.30.3 diff --git a/go.mod b/go.mod index 4175e958..b8f87b31 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/ceph/ceph-csi-operator -go 1.22.0 - -toolchain go1.22.5 +go 1.23.0 require ( github.com/ceph/ceph-csi-operator/api v0.0.0-00010101000000-000000000000 diff --git a/test/e2e/e2e_suite_test.go b/test/e2e/e2e_suite_test.go index 709a8357..fb599514 100644 --- a/test/e2e/e2e_suite_test.go +++ b/test/e2e/e2e_suite_test.go @@ -27,6 +27,9 @@ import ( // Run e2e tests using the Ginkgo runner. func TestE2E(t *testing.T) { RegisterFailHandler(Fail) - fmt.Fprintf(GinkgoWriter, "Starting ceph-csi-operator suite\n") + _, err := fmt.Fprintf(GinkgoWriter, "Starting ceph-csi-operator suite\n") + if err != nil { + t.Fatalf("Failed to write to GinkgoWriter: %v", err) + } RunSpecs(t, "e2e suite") } diff --git a/test/utils/utils.go b/test/utils/utils.go index 5e04e047..d8e4cc11 100644 --- a/test/utils/utils.go +++ b/test/utils/utils.go @@ -35,7 +35,10 @@ const ( ) func warnError(err error) { - fmt.Fprintf(GinkgoWriter, "warning: %v\n", err) + _, fErr := fmt.Fprintf(GinkgoWriter, "warning: %v\n", err) + if fErr != nil { + panic(fErr) + } } // InstallPrometheusOperator installs the prometheus Operator to be used to export the enabled metrics. @@ -53,12 +56,18 @@ func Run(cmd *exec.Cmd) ([]byte, error) { cmd.Dir = dir if err := os.Chdir(cmd.Dir); err != nil { - fmt.Fprintf(GinkgoWriter, "chdir dir: %s\n", err) + _, fErr := fmt.Fprintf(GinkgoWriter, "chdir dir: %s\n", err) + if fErr != nil { + panic(fErr) + } } cmd.Env = append(os.Environ(), "GO111MODULE=on") command := strings.Join(cmd.Args, " ") - fmt.Fprintf(GinkgoWriter, "running: %s\n", command) + _, err := fmt.Fprintf(GinkgoWriter, "running: %s\n", command) + if err != nil { + return nil, err + } output, err := cmd.CombinedOutput() if err != nil { return output, fmt.Errorf("%s failed with error: (%v) %s", command, err, string(output)) diff --git a/vendor/modules.txt b/vendor/modules.txt index e4ebc242..07f40908 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -2,7 +2,7 @@ ## explicit; go 1.11 github.com/beorn7/perks/quantile # github.com/ceph/ceph-csi-operator/api v0.0.0-00010101000000-000000000000 => ./api -## explicit; go 1.22.0 +## explicit; go 1.23.0 github.com/ceph/ceph-csi-operator/api/v1alpha1 # github.com/cespare/xxhash/v2 v2.3.0 ## explicit; go 1.11