This is an automated email from the ASF dual-hosted git repository.

djwang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry-pxf.git


The following commit(s) were added to refs/heads/main by this push:
     new a02fe8c3 Upgrade Go toolchain to 1.24 (#99)
a02fe8c3 is described below

commit a02fe8c3e890077f78c1ff0b10ea23af5cd572d2
Author: Dianjin Wang <[email protected]>
AuthorDate: Mon Apr 13 10:22:34 2026 +0800

    Upgrade Go toolchain to 1.24 (#99)
    
    - CI workflow: GO_VERSION 1.21 -> 1.24
    - Dockerfile: GO_VERSION 1.21.13 -> 1.24.0
    - go.mod: go 1.21.3 -> go 1.24
    - Documentation: Update minimum Go version requirement
    * Refactor ci/singlecluster/Dockerfile to use GO_VERSION variable
    
    See: https://github.com/apache/cloudberry-pxf/issues/96
---
 .github/workflows/pxf-ci.yml                               |  2 +-
 README.md                                                  |  2 +-
 automation/pxf_regress/go.mod                              |  2 +-
 .../src/main/resources/testcontainers/pxf-cbdb/Dockerfile  |  2 +-
 ci/singlecluster/Dockerfile                                |  3 ++-
 cli/README.md                                              |  2 +-
 cli/cmd/cluster.go                                         | 14 +++++++-------
 cli/go.mod                                                 |  2 +-
 8 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/.github/workflows/pxf-ci.yml b/.github/workflows/pxf-ci.yml
index 80cf5cb7..f029125a 100644
--- a/.github/workflows/pxf-ci.yml
+++ b/.github/workflows/pxf-ci.yml
@@ -38,7 +38,7 @@ concurrency:
 env:
   JAVA_VERSION: "11"
   JAVA_HOME: "/usr/lib/jvm/java-11-openjdk"
-  GO_VERSION: "1.21"
+  GO_VERSION: "1.24"
   GPHOME: "/usr/local/cloudberry-db"
   CLOUDBERRY_VERSION: "main"
   PXF_HOME: "/usr/local/pxf"
diff --git a/README.md b/README.md
index ff531a40..f6477072 100755
--- a/README.md
+++ b/README.md
@@ -76,7 +76,7 @@ To build PXF, you must have:
     export JAVA_HOME=/usr/lib/jvm/java-11-openjdk
     ```
 
-4. Go (1.9 or later)
+4. Go (1.24 or later)
 
     You can download and install Go via [Go downloads 
page](https://golang.org/dl/).
 
diff --git a/automation/pxf_regress/go.mod b/automation/pxf_regress/go.mod
index 5df3df33..d795292c 100644
--- a/automation/pxf_regress/go.mod
+++ b/automation/pxf_regress/go.mod
@@ -1,3 +1,3 @@
 module regress
 
-go 1.21.3
+go 1.24
diff --git a/automation/src/main/resources/testcontainers/pxf-cbdb/Dockerfile 
b/automation/src/main/resources/testcontainers/pxf-cbdb/Dockerfile
index 64ebf620..d0633320 100644
--- a/automation/src/main/resources/testcontainers/pxf-cbdb/Dockerfile
+++ b/automation/src/main/resources/testcontainers/pxf-cbdb/Dockerfile
@@ -48,7 +48,7 @@ RUN rm -rf /tmp/gradle /tmp/gradlew /tmp/gradlew.bat 
/tmp/.gradle
 ENV GRADLE_HOME="/opt/gradle-${GRADLE_VERSION}"
 
 # Go toolchain for building pxf_regress inside the container
-ARG GO_VERSION=1.21.13
+ARG GO_VERSION=1.24.0
 RUN ARCH=$(uname -m) && \
     case "$ARCH" in \
       x86_64) GARCH=amd64 ;; \
diff --git a/ci/singlecluster/Dockerfile b/ci/singlecluster/Dockerfile
index 4d6bb655..a16c3e9f 100644
--- a/ci/singlecluster/Dockerfile
+++ b/ci/singlecluster/Dockerfile
@@ -42,6 +42,7 @@ ENV      HIVE_VERSION=3.1.3
 ENV ZOOKEEPER_VERSION=3.5.9
 ENV     HBASE_VERSION=2.3.7
 ENV       TEZ_VERSION=0.9.2
+ENV        GO_VERSION=1.24.0
 
 # checksums from archive.apache.org
 ENV    
HADOOP_SHA512="0e0ee817c89b3c4eb761eca7f16640742a83b0e99b6fda26c1bee2baabedad93aab86e252bf5f1e2381c6d464bc4003d10c7cc0f61b2062f4c59732ca24d1bd9"
@@ -110,7 +111,7 @@ RUN set -e; \
       *) echo "Unsupported architecture: ${arch}"; exit 1 ;; \
     esac; \
     mkdir -p /tmp/pxf_src/ && cd /tmp && \
-    wget -O go.tgz -q "https://go.dev/dl/go1.23.3.linux-${go_arch}.tar.gz"; && \
+    wget -O go.tgz -q 
"https://go.dev/dl/go${GO_VERSION}.linux-${go_arch}.tar.gz"; && \
     sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go.tgz && rm 
go.tgz
 
 # Install MinIO and mc
diff --git a/cli/README.md b/cli/README.md
index 27d4aa76..b2692615 100644
--- a/cli/README.md
+++ b/cli/README.md
@@ -2,7 +2,7 @@
 
 ## Getting Started
 
-1. Ensure you are set up for PXF development by following the README.md at the 
root of this repository. This tool requires Go version 1.21 or higher. Follow 
the directions [here](https://golang.org/doc/) to get the language set up.
+1. Ensure you are set up for PXF development by following the README.md at the 
root of this repository. This tool requires Go version 1.24 or higher. Follow 
the directions [here](https://golang.org/doc/) to get the language set up.
 
 1. Run the tests
    ```
diff --git a/cli/cmd/cluster.go b/cli/cmd/cluster.go
index ee3c6b74..7cac7a7a 100644
--- a/cli/cmd/cluster.go
+++ b/cli/cmd/cluster.go
@@ -87,7 +87,7 @@ func handlePlurality(num int) string {
 func GenerateStatusReport(cmd *command, clusterData *ClusterData) {
        if _, ok := cmd.messages[standby]; !ok {
                // this command cares not about standby
-               gplog.Info(fmt.Sprintf(cmd.messages[status], 
clusterData.NumHosts, handlePlurality(clusterData.NumHosts)))
+               gplog.Info("%s", fmt.Sprintf(cmd.messages[status], 
clusterData.NumHosts, handlePlurality(clusterData.NumHosts)))
                return
        }
        standbyMsg := ""
@@ -99,7 +99,7 @@ func GenerateStatusReport(cmd *command, clusterData 
*ClusterData) {
                standbyMsg = cmd.messages[standby]
                numHosts--
        }
-       gplog.Info(fmt.Sprintf(cmd.messages[status], standbyMsg, numHosts, 
handlePlurality(numHosts)))
+       gplog.Info("%s", fmt.Sprintf(cmd.messages[status], standbyMsg, 
numHosts, handlePlurality(numHosts)))
 }
 
 // GenerateOutput is exported for testing
@@ -126,7 +126,7 @@ func GenerateOutput(cmd *command, clusterData *ClusterData) 
error {
                }
                response += fmt.Sprintf("%s ==> %s\n", host, errorMessage)
        }
-       gplog.Info("ERROR: "+cmd.messages[err], numErrors, 
clusterData.NumHosts, handlePlurality(clusterData.NumHosts))
+       gplog.Info("%s", fmt.Sprintf("ERROR: "+cmd.messages[err], numErrors, 
clusterData.NumHosts, handlePlurality(clusterData.NumHosts)))
        gplog.Error("%s", response)
        return errors.New(response)
 }
@@ -135,7 +135,7 @@ func doSetup() (*ClusterData, error) {
        connection := dbconn.NewDBConnFromEnvironment("postgres")
        err := connection.Connect(1)
        if err != nil {
-               gplog.Error(fmt.Sprintf("ERROR: Could not connect to 
Cloudberry.\n%s\n"+
+               gplog.Error("%s", fmt.Sprintf("ERROR: Could not connect to 
Cloudberry.\n%s\n"+
                        "Please make sure that your Apache Cloudberry is 
running and you are on the coordinator node.", err.Error()))
                return nil, err
        }
@@ -145,7 +145,7 @@ func doSetup() (*ClusterData, error) {
 
        segConfigs, err := cluster.GetSegmentConfiguration(connection, true)
        if err != nil {
-               gplog.Error(fmt.Sprintf("ERROR: Could not retrieve segment 
information from GPDB.\n%s\n" + err.Error()))
+               gplog.Error("ERROR: Could not retrieve segment information from 
GPDB.\n%s", err.Error())
                return nil, err
        }
        clusterData := &ClusterData{Cluster: cluster.NewCluster(segConfigs), 
connection: connection}
@@ -158,13 +158,13 @@ func clusterRun(cmd *command, clusterData *ClusterData) 
error {
 
        err := cmd.Warn(os.Stdin)
        if err != nil {
-               gplog.Info(fmt.Sprintf("%s", err))
+               gplog.Info("%s", fmt.Sprintf("%s", err))
                return err
        }
 
        functionToExecute, err := cmd.GetFunctionToExecute()
        if err != nil {
-               gplog.Error(fmt.Sprintf("Error: %s", err))
+               gplog.Error("%s", fmt.Sprintf("Error: %s", err))
                return err
        }
 
diff --git a/cli/go.mod b/cli/go.mod
index e05e448f..e5eec07c 100644
--- a/cli/go.mod
+++ b/cli/go.mod
@@ -1,6 +1,6 @@
 module pxf-cli
 
-go 1.21.3
+go 1.24
 
 require (
        github.com/apache/cloudberry-go-libs 
v1.0.12-0.20250910014224-fc376e8a1056


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to