Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
11098df
CASSJAVA-128 Upgrade Netty to 4.1.130 on 3.x
absurdfarce May 12, 2026
7307ea1
Bump lz4 impl to at.yawk version with CVE fix
absurdfarce Jul 8, 2026
9752fe6
Bump us up to Java8 for builds
absurdfarce Jul 8, 2026
e0001f0
Roll Jenkins label back to focal
absurdfarce Jul 8, 2026
3c67721
Bump various versions to match what's being tested with 4.x
absurdfarce Jul 8, 2026
0464909
Remove cloud tests since we're no longer leveraging these
absurdfarce Jul 8, 2026
7f8809f
Bump Jackson version to match what's in 4.x
absurdfarce Jul 8, 2026
663418c
Some Java6-to-Java8 POM cleanup
absurdfarce Jul 8, 2026
942df90
Somehow one of the Jackson dependencies snuck back in
absurdfarce Jul 8, 2026
ea5a40e
Add back in jackson-annotations in hope that it's a quick fix for the…
absurdfarce Jul 9, 2026
94d9266
Maven fix for something I borked when re-introducing jackson-annotations
absurdfarce Jul 9, 2026
354b6b0
Forgot to update BundleOptions to reference the new jackson-annotatio…
absurdfarce Jul 10, 2026
d92336b
Bump slf4j and logback versions to match what's on 4.x.
absurdfarce Jul 10, 2026
f156a05
Port changes to support Cassandra 4.0 (and up) configs from 4.x to 3.x
absurdfarce Jul 14, 2026
fca710c
Revert "Port changes to support Cassandra 4.0 (and up) configs from 4…
absurdfarce Aug 25, 2026
39b71a1
Fix storage port at the default (7000). Multi-node clusters expect t…
absurdfarce Aug 27, 2026
cfda9ac
Reapply "Port changes to support Cassandra 4.0 (and up) configs from …
absurdfarce Aug 27, 2026
9afcbdf
Fix up support for Cassandra 4.1 and up
absurdfarce Aug 28, 2026
0ce19bc
Fix to updateconf ccm command
absurdfarce Aug 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 42 additions & 54 deletions Jenkinsfile-datastax
Original file line number Diff line number Diff line change
Expand Up @@ -220,67 +220,61 @@ pipeline {
</table>''')
choice(
name: 'ADHOC_BUILD_AND_EXECUTE_TESTS_SERVER_VERSION',
choices: ['2.1', // Legacy Apache CassandraⓇ
'2.2', // Legacy Apache CassandraⓇ
'3.0', // Previous Apache CassandraⓇ
'3.11', // Current Apache CassandraⓇ
'4.0', // Development Apache CassandraⓇ
'dse-5.1', // Legacy DataStax Enterprise
'dse-6.0', // Previous DataStax Enterprise
'dse-6.7', // Previous DataStax Enterprise
'dse-6.8.0', // Current DataStax Enterprise
choices: ['4.0',
'4.1',
'5.0',
'dse-5.1.35',
'dse-6.0.18',
'dse-6.7.17',
'dse-6.8.30',
'dse-6.9.0',
'hcd-1.0.0',
'ALL'],
description: '''Apache Cassandra&reg; or DataStax Enterprise server version to use for adhoc <b>BUILD-AND-EXECUTE-TESTS</b> builds
<table style="width:100%">
<col width="15%">
<col width="85%">
<tr>
<th align="left">Choice</th>
<th align="left">Description</th>
</tr>
<tr>
<td><strong>2.1</strong></td>
<td>Apache Cassandra&reg; v2.1.x</td>
<td><strong>4.0</strong></td>
<td>Apache Cassandra&reg; v4.0.x</td>
</tr>
<tr>
<td><strong>2.2</strong></td>
<td>Apache Cassandra&reg; v2.2.x</td>
<td><strong>4.1</strong></td>
<td>Apache Cassandra&reg; v4.1.x</td>
</tr>
<tr>
<td><strong>3.0</strong></td>
<td>Apache Cassandra&reg; v3.0.x</td>
<td><strong>5.0</strong></td>
<td>Apache Cassandra&reg; v5.0.x</td>
</tr>
<tr>
<td><strong>3.11</strong></td>
<td>Apache Cassandra&reg; v3.11.x</td>
<td><strong>dse-5.1.35</strong></td>
<td>DataStax Enterprise v5.1.35</td>
</tr>
<tr>
<td><strong>4.0</strong></td>
<td>Apache Cassandra&reg; v4.x (<b>CURRENTLY UNDER DEVELOPMENT</b>)</td>
<td><strong>dse-6.0.18</strong></td>
<td>DataStax Enterprise v6.0.18</td>
</tr>
<tr>
<td><strong>dse-5.1</strong></td>
<td>DataStax Enterprise v5.1.x</td>
<td><strong>dse-6.7.17</strong></td>
<td>DataStax Enterprise v6.7.17</td>
</tr>
<tr>
<td><strong>dse-6.0</strong></td>
<td>DataStax Enterprise v6.0.x</td>
<td><strong>dse-6.8.30</strong></td>
<td>DataStax Enterprise v6.8.30</td>
</tr>
<tr>
<td><strong>dse-6.7</strong></td>
<td>DataStax Enterprise v6.7.x</td>
<td><strong>dse-6.9.0</strong></td>
<td>DataStax Enterprise v6.9.0</td>
</tr>
<tr>
<td><strong>dse-6.8.0</strong></td>
<td>DataStax Enterprise v6.8.0</td>
<td><strong>hcd-1.0.0</strong></td>
<td>DataStax HCD v1.0.0</td>
</tr>
</table>''')
choice(
name: 'ADHOC_BUILD_AND_EXECUTE_TESTS_JABBA_VERSION',
choices: ['zulu@1.6', // Zulu JDK 1.6
'zulu@1.7', // Zulu JDK 1.7
'1.8', // Oracle JDK version 1.8 (current default)
'openjdk@1.11'], // OpenJDK version 11
choices: ['1.8',
'openjdk@1.11'],
description: '''JDK version to use for <b>TESTING</b> when running adhoc <b>BUILD-AND-EXECUTE-TESTS</b> builds. <i>All builds will use JDK8 for building the driver</i>
<table style="width:100%">
<col width="15%">
Expand All @@ -289,14 +283,6 @@ pipeline {
<th align="left">Choice</th>
<th align="left">Description</th>
</tr>
<tr>
<td><strong>zulu@1.6</strong></td>
<td>Zulu JDK version 1.6</td>
</tr>
<tr>
<td><strong>zulu@1.7</strong></td>
<td>Zulu JDK version 1.7</td>
</tr>
<tr>
<td><strong>1.8</strong></td>
<td>Oracle JDK version 1.8 (<i>Used for compiling regardless of choice</i>)</td>
Expand Down Expand Up @@ -341,7 +327,7 @@ pipeline {
}

environment {
OS_VERSION = 'ubuntu/jammy64/java-driver'
OS_VERSION = 'ubuntu/focal64/java-driver'
JABBA_SHELL = '/usr/lib/jabba/jabba.sh'
CCM_ENVIRONMENT_SHELL = '/usr/local/bin/ccm_environment.sh'
}
Expand All @@ -367,8 +353,9 @@ pipeline {
axes {
axis {
name 'SERVER_VERSION'
values '3.11', // Current Apache CassandraⓇ
'4.0' // Development Apache CassandraⓇ
values '4.0',
'4.1',
'5.0'
}
}

Expand Down Expand Up @@ -474,14 +461,15 @@ pipeline {
axes {
axis {
name 'SERVER_VERSION'
values '2.1', // Legacy Apache CassandraⓇ
'3.0', // Previous Apache CassandraⓇ
'3.11', // Current Apache CassandraⓇ
'4.0', // Development Apache CassandraⓇ
'dse-5.1', // Legacy DataStax Enterprise
'dse-6.0', // Previous DataStax Enterprise
'dse-6.7', // Previous DataStax Enterprise
'dse-6.8.0' // Current DataStax Enterprise
values '4.0',
'4.1',
'5.0',
'dse-5.1.35',
'dse-6.0.18',
'dse-6.7.17',
'dse-6.8.30',
'dse-6.9.0',
'hcd-1.0.0'
}
}
when {
Expand Down
2 changes: 1 addition & 1 deletion driver-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
</dependency>

<dependency>
<groupId>org.lz4</groupId>
<groupId>at.yawk.lz4</groupId>
<artifactId>lz4-java</artifactId>
<optional>true</optional>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

Expand All @@ -39,6 +40,17 @@ public class VersionNumber implements Comparable<VersionNumber> {
"(\\d+)\\.(\\d+)(\\.\\d+)?(\\.\\d+)?([~\\-]\\w[.\\w]*(?:\\-\\w[.\\w]*)*)?(\\+[.\\w]+)?";
private static final Pattern pattern = Pattern.compile(VERSION_REGEXP);

public static final VersionNumber V1_0_0 = Objects.requireNonNull(parse("1.0.0"));
public static final VersionNumber V2_1_0 = Objects.requireNonNull(parse("2.1.0"));
public static final VersionNumber V2_2_0 = Objects.requireNonNull(parse("2.2.0"));
public static final VersionNumber V3_0_0 = Objects.requireNonNull(parse("3.0.0"));
public static final VersionNumber V4_0_0 = Objects.requireNonNull(parse("4.0.0"));
public static final VersionNumber V4_1_0 = Objects.requireNonNull(parse("4.1.0"));
public static final VersionNumber V5_0_0 = Objects.requireNonNull(parse("5.0.0"));
public static final VersionNumber V6_7_0 = Objects.requireNonNull(parse("6.7.0"));
public static final VersionNumber V6_8_0 = Objects.requireNonNull(parse("6.8.0"));
public static final VersionNumber V6_9_0 = Objects.requireNonNull(parse("6.9.0"));

private final int major;
private final int minor;
private final int patch;
Expand Down
55 changes: 49 additions & 6 deletions driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -682,11 +682,54 @@ public void decommission(int n) {

@Override
public void updateConfig(Map<String, Object> configs) {
StringBuilder confStr = new StringBuilder();
VersionNumber cassandraVersion = getCassandraVersion();
for (Map.Entry<String, Object> entry : configs.entrySet()) {
confStr.append(entry.getKey()).append(":").append(entry.getValue()).append(" ");

String originalKey = entry.getKey();
Object originalValue = entry.getValue();

String updateString = String.join(
":",
getConfigKey(originalKey, originalValue, cassandraVersion),
getConfigValue(originalKey, originalValue, cassandraVersion));
execute(
CCM_COMMAND + " updateconf %s",
updateString);
}
execute(CCM_COMMAND + " updateconf " + confStr);
}

private static String IN_MS_STR = "_in_ms";
private static int IN_MS_STR_LENGTH = IN_MS_STR.length();
private static String ENABLE_STR = "enable_";
private static int ENABLE_STR_LENGTH = ENABLE_STR.length();
private static String IN_KB_STR = "_in_kb";
private static int IN_KB_STR_LENGTH = IN_KB_STR.length();

private static String getConfigKey(
String originalKey, Object originalValue, VersionNumber cassandraVersion) {

// At least for now we won't support substitutions on nested keys. This requires an extra
// traversal of the string
// but we'll live with that for now
if (originalKey.contains(".")) return originalKey;
if (cassandraVersion.compareTo(VersionNumber.V4_1_0) < 0) return originalKey;
if (originalKey.endsWith(IN_MS_STR))
return originalKey.substring(0, originalKey.length() - IN_MS_STR_LENGTH);
if (originalKey.startsWith(ENABLE_STR))
return originalKey.substring(ENABLE_STR_LENGTH) + "_enabled";
if (originalKey.endsWith(IN_KB_STR))
return originalKey.substring(0, originalKey.length() - IN_KB_STR_LENGTH);
return originalKey;
}

private static String getConfigValue(
String originalKey, Object originalValue, VersionNumber cassandraVersion) {

String originalValueStr = originalValue.toString();
if (cassandraVersion.compareTo(VersionNumber.V4_1_0) < 0) return originalValueStr;
if (originalKey.endsWith(IN_MS_STR)) return originalValueStr + "ms";
if (originalKey.endsWith(IN_KB_STR)) return originalValueStr + "KiB";
return originalValueStr;
}

@Override
Expand Down Expand Up @@ -902,7 +945,7 @@ public static class Builder {

private Builder() {
cassandraConfiguration.put("start_rpc", false);
cassandraConfiguration.put("storage_port", RANDOM_PORT);
cassandraConfiguration.put("storage_port", 7000);
cassandraConfiguration.put("rpc_port", RANDOM_PORT);
cassandraConfiguration.put("native_transport_port", RANDOM_PORT);
}
Expand Down Expand Up @@ -1081,11 +1124,11 @@ public CCMBridge build() {
if (!dse) {
if (isMaterializedViewsDisabledByDefault(cassandraVersion)) {
// enable materialized views
cassandraConfiguration.put("enable_materialized_views", true);
cassandraConfiguration.put(getConfigKey("enable_materialized_views",true,cassandraVersion), true);
}
if (isSasiConfigEnablementRequired(cassandraVersion)) {
// enable SASI indexing in config (disabled by default in C* 4.0)
cassandraConfiguration.put("enable_sasi_indexes", true);
cassandraConfiguration.put(getConfigKey("enable_sasi_indexes",true,cassandraVersion), true);
}
}
final CCMBridge ccm =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import com.datastax.driver.core.CreateCCM.TestMode;
import com.datastax.driver.core.exceptions.InvalidQueryException;
import com.google.common.base.Throwables;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import com.google.common.io.Closer;
import com.google.common.util.concurrent.Uninterruptibles;
Expand Down Expand Up @@ -75,14 +74,6 @@ public class CCMTestsSupport {
private static final List<String> TEST_GROUPS =
Lists.newArrayList("isolated", "short", "long", "stress", "duration");

// A mapping of cassandra.yaml config options to their version requirements.
// If a config is passed containing one of these options and the version requirement cannot be met
// the option is simply filtered.
private static final Map<String, VersionNumber> configVersionRequirements =
ImmutableMap.<String, VersionNumber>builder()
.put("enable_user_defined_functions", VersionNumber.parse("2.2.0"))
.build();

private static class ReadOnlyCCMAccess implements CCMAccess {

private final CCMAccess delegate;
Expand Down Expand Up @@ -386,21 +377,6 @@ private void addConfigOptions(String[] conf, Map<String, Object> config) {
if (tokens.length != 2) fail("Wrong configuration option: " + aConf);
String key = tokens[0];
String value = tokens[1];
// If we've detected a property with a version requirement, skip it if the version
// requirement
// cannot be met.
if (configVersionRequirements.containsKey(key)) {
VersionNumber requirement = configVersionRequirements.get(key);
if (version != null && version.compareTo(requirement) < 0) {
LOGGER.debug(
"Skipping inclusion of '{}' in cassandra.yaml since it requires >= C* {} and {} "
+ "was detected.",
aConf,
requirement,
version);
continue;
}
}
config.put(key, value);
}
}
Expand Down
Loading