- Notifications
You must be signed in to change notification settings - Fork 250
CSHARP-1019: Add support for C* 4.1, DSE 6.9.x, and HCD releases to CI #615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 10 commits
ac5c0b0 f985c6f c77a8ca 059bbcd 49e8122 eb9741b 6e10968 69b9eb3 3b05e38 7eaff90 eca06aa 8346a00 fd61e10 8b25d96 42e80d0 7638e82 be48ab7 1b51a9f 1232d7f 966a77c 6c58320 1417a70 3fddfa4 729b23f e6cda97 File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -129,13 +129,26 @@ CCM_CASSANDRA_VERSION=${DSE_FIXED_VERSION} # maintain for backwards compatibilit | |
| CCM_VERSION=${DSE_FIXED_VERSION} | ||
| CCM_SERVER_TYPE=dse | ||
| DSE_VERSION=${DSE_FIXED_VERSION} | ||
| CCM_IS_DSE=true | ||
| CCM_DISTRIBUTION=dse | ||
| CASSANDRA_VERSION=${DSE_FIXED_VERSION} | ||
| CCM_BRANCH=${DSE_FIXED_VERSION} | ||
| DSE_BRANCH=${DSE_FIXED_VERSION} | ||
| JDK=1.8 | ||
| ENVIRONMENT_EOF | ||
| ''' | ||
| } | ||
| | ||
| if (env.SERVER_VERSION.split('-')[0] == 'hcd') { | ||
| env.HCD_FIXED_VERSION = env.SERVER_VERSION.split('-')[1] | ||
| sh label: 'Update environment for HCD', script: '''#!/bin/bash -le | ||
| cat >> ${HOME}/environment.txt << ENVIRONMENT_EOF | ||
| CCM_PATH=${HOME}/ccm | ||
| CCM_CASSANDRA_VERSION=${HCD_FIXED_VERSION} # maintain for backwards compatibility | ||
| CASSANDRA_VERSION=${HCD_FIXED_VERSION} | ||
| CCM_DISTRIBUTION=hcd | ||
| ENVIRONMENT_EOF | ||
| ''' | ||
| } | ||
| | ||
| if (env.SERVER_VERSION == env.SERVER_VERSION_SNI && env.DOTNET_VERSION != 'mono') { | ||
| sh label: 'Update environment for SNI proxy tests', script: '''#!/bin/bash -le | ||
| | @@ -435,10 +448,13 @@ pipeline { | |
| values '3.0', // latest 3.0.x Apache Cassandra� | ||
| '3.11', // latest 3.11.x Apache Cassandra� | ||
| '4.0', // latest 4.0.x Apache Cassandra� | ||
| '5.0-beta1', // Development Apache Cassandra� | ||
| '4.1', | ||
| '5.0', // Development Apache Cassandra� | ||
| 'dse-5.1.35', // latest 5.1.x DataStax Enterprise | ||
| 'dse-6.7.17', // latest 6.7.x DataStax Enterprise | ||
| 'dse-6.8.30' // 6.8 current DataStax Enterprise | ||
| 'dse-6.8.30', // 6.8 current DataStax Enterprise | ||
| 'dse-6.9.3', | ||
| 'hcd-1.0.0' | ||
| ||
| } | ||
| axis { | ||
| name 'DOTNET_VERSION' | ||
| | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -29,6 +29,7 @@ public static class TestClusterManager | |
| public const string DefaultKeyspaceName = "test_cluster_keyspace"; | ||
| private static ICcmProcessExecuter _executor; | ||
| | ||
| private static readonly Version Version1Dot0 = new Version(1, 0); | ||
| ||
| private static readonly Version Version2Dot0 = new Version(2, 0); | ||
| private static readonly Version Version2Dot1 = new Version(2, 1); | ||
| private static readonly Version Version2Dot2 = new Version(2, 2); | ||
| | @@ -44,6 +45,8 @@ public static class TestClusterManager | |
| private static readonly Version Version5Dot1 = new Version(5, 1); | ||
| private static readonly Version Version6Dot0 = new Version(6, 0); | ||
| private static readonly Version Version6Dot7 = new Version(6, 7); | ||
| private static readonly Version Version6Dot8 = new Version(6, 8); | ||
| private static readonly Version Version6Dot9 = new Version(6, 9); | ||
| | ||
| /// <summary> | ||
| /// Gets the Cassandra version used for this test run | ||
| | @@ -70,15 +73,18 @@ public static Version CassandraVersion | |
| // C* 3.0 | ||
| return Version3Dot0; | ||
| } | ||
| if (dseVersion < Version6Dot0) | ||
| if (dseVersion <= Version6Dot9) | ||
| ||
| { | ||
| // C* 3.11 | ||
| return Version3Dot11; | ||
| } | ||
| // C* 4.0 | ||
| return Version4Dot0; | ||
| } | ||
| | ||
| if (IsHcd) | ||
| { | ||
| return Version4Dot0; | ||
| } | ||
| return new Version(TestClusterManager.CassandraVersionString.Split('-')[0]); | ||
| } | ||
| } | ||
| | @@ -99,14 +105,50 @@ public static string DsePath | |
| get { return Environment.GetEnvironmentVariable("DSE_PATH"); } | ||
| } | ||
| | ||
| public enum BackendType | ||
| { | ||
| Hcd, | ||
| Dse, | ||
| Cassandra | ||
| } | ||
| | ||
| /// <summary> | ||
| /// "hcd", "dse", or "cassandra" (default) | ||
| /// </summary> | ||
| public static BackendType CurrentBackendType | ||
| { | ||
| get | ||
| { | ||
| string distribution = Environment.GetEnvironmentVariable("CCM_DISTRIBUTION") ?? "cassandra"; | ||
| Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently the test project is relying on checking for Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok I see you also changed the implementation of | ||
| switch (distribution) | ||
| { | ||
| case "hcd": | ||
| return BackendType.Hcd; | ||
| case "dse": | ||
| return BackendType.Dse; | ||
| case "cassandra": | ||
| return BackendType.Cassandra; | ||
| default: | ||
| throw new TestInfrastructureException("Unknown CCM_DISTRIBUTION value: " + distribution); | ||
| } | ||
| } | ||
| } | ||
| | ||
| public static string InitialContactPoint | ||
| { | ||
| get { return IpPrefix + "1"; } | ||
| } | ||
| | ||
| public static string DseVersionString | ||
| { | ||
| get { return Environment.GetEnvironmentVariable("DSE_VERSION") ?? "6.7.7"; } | ||
| get | ||
| { | ||
| if (!IsDse) | ||
| { | ||
| throw new TestInfrastructureException("DSE_VERSION is only available when using DSE backend"); | ||
| } | ||
| return Environment.GetEnvironmentVariable("CASSANDRA_VERSION") ?? "6.7.7"; | ||
| } | ||
| } | ||
| | ||
| public static string CassandraVersionString | ||
| | @@ -116,7 +158,12 @@ public static string CassandraVersionString | |
| | ||
| public static bool IsDse | ||
| { | ||
| get { return Environment.GetEnvironmentVariable("DSE_VERSION") != null; } | ||
| get { return CurrentBackendType == BackendType.Dse; } | ||
| } | ||
| | ||
| public static bool IsHcd | ||
| { | ||
| get { return CurrentBackendType == BackendType.Hcd; } | ||
| } | ||
| | ||
| public static Version DseVersion | ||
| | @@ -161,15 +208,14 @@ public static bool CheckDseVersion(Version version, Comparison comparison) | |
| | ||
| public static bool CheckCassandraVersion(bool requiresOss, Version version, Comparison comparison) | ||
| { | ||
| if (requiresOss && TestClusterManager.IsDse) | ||
| if (requiresOss && TestClusterManager.CurrentBackendType != BackendType.Cassandra) | ||
| { | ||
| return false; | ||
| } | ||
| | ||
| var runningVersion = TestClusterManager.IsDse ? TestClusterManager.DseVersion : TestClusterManager.CassandraVersion; | ||
| var expectedVersion = TestClusterManager.IsDse ? TestClusterManager.GetDseVersionFromCassandraVersion(version) : version; | ||
| | ||
| return TestDseVersion.VersionMatch(expectedVersion, runningVersion, comparison); | ||
| var runningVersion = TestClusterManager.CassandraVersion; | ||
| var expectedVersion = version; | ||
| return TestCassandraVersion.VersionMatch(expectedVersion, runningVersion, comparison); | ||
| } | ||
| | ||
| /// <summary> | ||
| | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's another
Jenkinsfilethat needs this changes too probably. That jenkinsfile is responsible for daily/weekly builds.