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

joao-r-reis pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-gocql-driver.git


The following commit(s) were added to refs/heads/trunk by this push:
     new d1b3e1a9 Fix token generation failure on GitHub runners by pinning 
Java and bumping CCM
d1b3e1a9 is described below

commit d1b3e1a9879113ec2e9a6ce7c2f3c1f2246a56e7
Author: João Reis <[email protected]>
AuthorDate: Sat Oct 24 00:23:53 2026 +0100

    Fix token generation failure on GitHub runners by pinning Java and bumping 
CCM
    
    On GitHub Actions runners where the default JDK is 25, CCM's token 
generation
    call to Cassandra's generatetokens script executed under ambient JDK 25 and
    emitted JVM warnings to stdout. CCM misinterpreted these warning lines as 
token
    output, assigning invalid initial_token strings to nodes and causing 
Cassandra
    to fail on startup.
    
    This patch updates CCM to latest trunk, explicitly sets up Java 11 and 17 
via
    actions/setup-java with JAVA_HOME defaulting to Java 11 (<= 21), and sets
    JAVA11_HOME and JAVA17_HOME in Makefile so CCM uses appropriate JVMs for
    Cassandra node instances while token generation runs safely under Java 11.
    
    Patch by João Reis; reviewed by Bohdan Siryk for CASSGO-140
---
 .github/workflows/main.yml | 36 ++++++++++++++++++++----------------
 Makefile                   | 11 +++++++++--
 2 files changed, 29 insertions(+), 18 deletions(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index d3d7b80a..b42463e4 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -10,7 +10,7 @@ on:
 jobs:
   unit-tests-amd64:
     name: Unit tests AMD64
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-26.04
     strategy:
       matrix:
         go: [ '1.25', '1.26' ]
@@ -26,7 +26,7 @@ jobs:
   
   unit-tests-arm64:
     name: Unit tests ARM64
-    runs-on: ubuntu-24.04-arm
+    runs-on: ubuntu-26.04-arm
     strategy:
       matrix:
         go: [ '1.25', '1.26' ]
@@ -46,7 +46,7 @@ jobs:
       - unit-tests-amd64
       - unit-tests-arm64
     name: Integration Tests
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-26.04
     strategy:
       fail-fast: false
       matrix:
@@ -66,18 +66,20 @@ jobs:
         with:
           go-version: ${{ matrix.go }}
 
+      - name: Set up Java
+        uses: actions/setup-java@v6
+        with:
+          distribution: 'temurin'
+          java-version: |
+            17
+            11
+
       - uses: actions/setup-python@v6
         with:
           python-version: '3.10'
           cache: 'pip'
           cache-dependency-path: Makefile
 
-      - name: Set up cache for SDKMAN
-        uses: actions/cache@v5
-        with:
-          path: ~/.sdkman
-          key: ${{ runner.os }}-sdkman
-
       - name: Set up cache for CCM
         uses: actions/cache@v5
         with:
@@ -113,7 +115,7 @@ jobs:
       - unit-tests-amd64
       - unit-tests-arm64
     name: Integration Tests with auth
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-26.04
     strategy:
       fail-fast: false
       matrix:
@@ -131,18 +133,20 @@ jobs:
         with:
           go-version: ${{ matrix.go }}
 
+      - name: Set up Java
+        uses: actions/setup-java@v6
+        with:
+          distribution: 'temurin'
+          java-version: |
+            17
+            11
+
       - uses: actions/setup-python@v6
         with:
           python-version: '3.10'
           cache: 'pip'
           cache-dependency-path: Makefile
 
-      - name: Set up cache for SDKMAN
-        uses: actions/cache@v5
-        with:
-          path: ~/.sdkman
-          key: ${{ runner.os }}-sdkman
-
       - name: Set up cache for CCM
         uses: actions/cache@v5
         with:
diff --git a/Makefile b/Makefile
index 45b76554..d1883b4d 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ TEST_CQL_PROTOCOL ?= 4
 TEST_COMPRESSOR ?= no-compression
 TEST_INTEGRATION_TAGS ?= integration
 
-CCM_VERSION ?= 39b8222b31a6c7afe8fe845d16981088a5a735ad
+CCM_VERSION ?= 7efd4c6cabd85499e53a475be81e028d59bcb15b
 GOLANGCI_VERSION = v2.1.6
 JVM_EXTRA_OPTS ?= -Dcassandra.test.fail_writes_ks=test 
-Dcassandra.custom_query_handler_class=org.apache.cassandra.cql3.CustomPayloadMirroringQueryHandler
 ifeq (${CCM_CONFIG_DIR},)
@@ -40,6 +40,9 @@ else
 "materialized_views_enabled: true"
 endif
 
+JAVA11_HOME ?= ${JAVA_HOME_11_X64}
+JAVA17_HOME ?= ${JAVA_HOME_17_X64}
+
 ifneq (${JAVA11_HOME},)
        export JAVA11_HOME
 endif
@@ -113,7 +116,11 @@ fix: .prepare-golangci
        golangci-lint run --fix
 
 .prepare-java:
-ifeq ($(shell if [ -f ~/.sdkman/bin/sdkman-init.sh ]; then echo "installed"; 
else echo "not-installed"; fi), not-installed)
+ifneq (${JAVA11_HOME},)
+       @exit 0
+else ifneq (${JAVA_HOME_11_X64},)
+       @exit 0
+else ifeq ($(shell if [ -f ~/.sdkman/bin/sdkman-init.sh ]; then echo 
"installed"; else echo "not-installed"; fi), not-installed)
        @$(MAKE) install-java
 else
        @exit 0


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

Reply via email to