mirror of https://github.com/apache/cassandra
Drop JDK8 and add JDK17, remove eclipse-warnings in favor of Checker Framework and upgrade checkstyle
patch by Ekaterina Dimitrova; reviewed by Jeremiah Jordan, Berenguer Blasi, Michael Semb Wever and Jacek Lewandowski for CASSANDRA-18255
This commit is contained in:
parent
08a9dd805e
commit
3755934e52
|
|
@ -20,11 +20,13 @@
|
|||
xmlns:rat="antlib:org.apache.rat.anttasks">
|
||||
|
||||
<target name="init-checkstyle" depends="resolver-retrieve-build,build-project" unless="no-checkstyle">
|
||||
<echo message="checkstyle.version=${checkstyle.version}"/>
|
||||
<path id="checkstyle.lib.path">
|
||||
<fileset dir="${test.lib}/jars" includes="*.jar"/>
|
||||
</path>
|
||||
<!-- Sevntu custom checks are retrieved by Ivy into lib folder
|
||||
and will be accessible to checkstyle-->
|
||||
<taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties"
|
||||
classpathref="checkstyle.classpath"/>
|
||||
classpathref="checkstyle.lib.path"/>
|
||||
</target>
|
||||
|
||||
<target name="checkstyle" depends="init-checkstyle,build-project" description="Run custom checkstyle code analysis" unless="no-checkstyle">
|
||||
|
|
|
|||
|
|
@ -128,12 +128,6 @@
|
|||
</dependencies>
|
||||
<path refid="jflex.classpath" classpath="runtime"/>
|
||||
</resolve>
|
||||
<resolve>
|
||||
<dependencies>
|
||||
<dependency groupId="com.puppycrawl.tools" artifactId="checkstyle" version="${checkstyle.version}" />
|
||||
</dependencies>
|
||||
<path refid="checkstyle.classpath" classpath="runtime"/>
|
||||
</resolve>
|
||||
|
||||
<macrodef name="install">
|
||||
<attribute name="pomFile"/>
|
||||
|
|
|
|||
|
|
@ -62,6 +62,10 @@
|
|||
<groupId>com.google.jimfs</groupId>
|
||||
<artifactId>jimfs</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.puppycrawl.tools</groupId>
|
||||
<artifactId>checkstyle</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.quicktheories</groupId>
|
||||
<artifactId>quicktheories</artifactId>
|
||||
|
|
|
|||
|
|
@ -49,12 +49,6 @@ if [[ ! "$java_version" =~ $regx_java_version ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# TODO – remove after CASSANDRA-18255
|
||||
if [ "$java_version" == "1.8" ]; then
|
||||
echo "Error: Java 8 is not supported, ref CASSANDRA-18255"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
################################
|
||||
#
|
||||
# Main
|
||||
|
|
|
|||
|
|
@ -494,6 +494,12 @@
|
|||
<version>2.35.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.puppycrawl.tools</groupId>
|
||||
<artifactId>checkstyle</artifactId>
|
||||
<version>10.12.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
<artifactId>jna</artifactId>
|
||||
|
|
|
|||
13961
.circleci/config.yml
13961
.circleci/config.yml
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,55 +1,6 @@
|
|||
--- config_template.yml 2023-06-16 12:35:53.260639863 +0100
|
||||
+++ config_template.yml.PAID 2023-06-16 12:37:27.215497973 +0100
|
||||
--- config_template.yml 2023-07-24 11:55:54.000000000 -0400
|
||||
+++ config_template.yml.PAID 2023-07-24 11:58:41.000000000 -0400
|
||||
@@ -157,14 +157,14 @@
|
||||
j8_par_executor: &j8_par_executor
|
||||
executor:
|
||||
name: java8-executor
|
||||
- #exec_resource_class: xlarge
|
||||
- parallelism: 4
|
||||
+ exec_resource_class: medium
|
||||
+ parallelism: 25
|
||||
|
||||
j8_small_par_executor: &j8_small_par_executor
|
||||
executor:
|
||||
name: java8-executor
|
||||
- #exec_resource_class: xlarge
|
||||
- parallelism: 1
|
||||
+ exec_resource_class: large
|
||||
+ parallelism: 10
|
||||
|
||||
j8_small_executor: &j8_small_executor
|
||||
executor:
|
||||
@@ -172,29 +172,41 @@
|
||||
exec_resource_class: medium
|
||||
parallelism: 1
|
||||
|
||||
+j8_large_par_executor: &j8_large_par_executor
|
||||
+ executor:
|
||||
+ name: java8-executor
|
||||
+ exec_resource_class: large
|
||||
+ parallelism: 50
|
||||
+
|
||||
+j11_very_large_par_executor: &j11_very_large_par_executor
|
||||
+ executor:
|
||||
+ name: java11-executor
|
||||
+ exec_resource_class: large
|
||||
+ parallelism: 100
|
||||
+
|
||||
j8_medium_par_executor: &j8_medium_par_executor
|
||||
executor:
|
||||
name: java8-executor
|
||||
- #exec_resource_class: xlarge
|
||||
- parallelism: 1
|
||||
+ exec_resource_class: xlarge
|
||||
+ parallelism: 4
|
||||
|
||||
j8_seq_executor: &j8_seq_executor
|
||||
executor:
|
||||
name: java8-executor
|
||||
- #exec_resource_class: xlarge
|
||||
+ exec_resource_class: medium
|
||||
parallelism: 1 # sequential, single container tests: no parallelism benefits
|
||||
|
||||
j11_par_executor: &j11_par_executor
|
||||
executor:
|
||||
name: java11-executor
|
||||
|
|
@ -68,7 +19,22 @@
|
|||
|
||||
j11_small_executor: &j11_small_executor
|
||||
executor:
|
||||
@@ -205,44 +217,56 @@
|
||||
@@ -172,30 +172,41 @@
|
||||
exec_resource_class: medium
|
||||
parallelism: 1
|
||||
|
||||
+j11_large_par_executor: &j11_large_par_executor
|
||||
+ executor:
|
||||
+ name: java11-executor
|
||||
+ exec_resource_class: large
|
||||
+ parallelism: 50
|
||||
+
|
||||
+j11_very_large_par_executor: &j11_very_large_par_executor
|
||||
+ executor:
|
||||
+ name: java11-executor
|
||||
+ exec_resource_class: large
|
||||
+ parallelism: 100
|
||||
+
|
||||
j11_medium_par_executor: &j11_medium_par_executor
|
||||
executor:
|
||||
name: java11-executor
|
||||
|
|
@ -76,40 +42,53 @@
|
|||
- parallelism: 1
|
||||
+ exec_resource_class: xlarge
|
||||
+ parallelism: 4
|
||||
+
|
||||
+j11_large_par_executor: &j11_large_par_executor
|
||||
+ executor:
|
||||
+ name: java11-executor
|
||||
+ exec_resource_class: large
|
||||
+ parallelism: 50
|
||||
|
||||
j11_seq_executor: &j11_seq_executor
|
||||
executor:
|
||||
name: java11-executor
|
||||
- #exec_resource_class: xlarge
|
||||
+ exec_resource_class: medium
|
||||
exec_resource_class: medium
|
||||
parallelism: 1 # sequential, single container tests: no parallelism benefits
|
||||
|
||||
j8_repeated_utest_executor: &j8_repeated_utest_executor
|
||||
j17_par_executor: &j17_par_executor
|
||||
executor:
|
||||
name: java8-executor
|
||||
name: java17-executor
|
||||
- #exec_resource_class: xlarge
|
||||
- parallelism: 4
|
||||
+ exec_resource_class: medium
|
||||
+ parallelism: 25
|
||||
|
||||
j8_repeated_dtest_executor: &j8_repeated_dtest_executor
|
||||
j17_small_par_executor: &j17_small_par_executor
|
||||
executor:
|
||||
name: java8-executor
|
||||
- parallelism: 4
|
||||
name: java17-executor
|
||||
- #exec_resource_class: xlarge
|
||||
- parallelism: 1
|
||||
+ exec_resource_class: large
|
||||
+ parallelism: 25
|
||||
+ parallelism: 10
|
||||
|
||||
j11_repeated_upgrade_dtest_executor: &j11_repeated_upgrade_dtest_executor
|
||||
j17_small_executor: &j17_small_executor
|
||||
executor:
|
||||
name: java11-executor
|
||||
- parallelism: 4
|
||||
@@ -206,44 +217,56 @@
|
||||
j17_medium_par_executor: &j17_medium_par_executor
|
||||
executor:
|
||||
name: java17-executor
|
||||
- #exec_resource_class: xlarge
|
||||
- parallelism: 1
|
||||
+ exec_resource_class: xlarge
|
||||
+ parallelism: 25
|
||||
+ parallelism: 4
|
||||
+
|
||||
+j17_large_par_executor: &j17_large_par_executor
|
||||
+ executor:
|
||||
+ name: java17-executor
|
||||
+ exec_resource_class: large
|
||||
+ parallelism: 50
|
||||
|
||||
j17_seq_executor: &j17_seq_executor
|
||||
executor:
|
||||
name: java17-executor
|
||||
- #exec_resource_class: xlarge
|
||||
+ exec_resource_class: medium
|
||||
parallelism: 1 # sequential, single container tests: no parallelism benefits
|
||||
|
||||
j11_repeated_jvm_upgrade_dtest_executor: &j11_repeated_jvm_upgrade_dtest_executor
|
||||
executor:
|
||||
|
|
@ -132,37 +111,40 @@
|
|||
+ exec_resource_class: large
|
||||
+ parallelism: 25
|
||||
|
||||
j8_separate_jobs: &j8_separate_jobs
|
||||
j17_repeated_utest_executor: &j17_repeated_utest_executor
|
||||
executor:
|
||||
name: java17-executor
|
||||
- parallelism: 4
|
||||
+ exec_resource_class: medium
|
||||
+ parallelism: 25
|
||||
|
||||
j17_repeated_dtest_executor: &j17_repeated_dtest_executor
|
||||
executor:
|
||||
name: java17-executor
|
||||
- parallelism: 4
|
||||
+ exec_resource_class: large
|
||||
+ parallelism: 25
|
||||
|
||||
j11_repeated_upgrade_dtest_executor: &j11_repeated_upgrade_dtest_executor
|
||||
executor:
|
||||
name: java11-executor
|
||||
- parallelism: 4
|
||||
+ exec_resource_class: xlarge
|
||||
+ parallelism: 25
|
||||
|
||||
j11_separate_jobs: &j11_separate_jobs
|
||||
jobs:
|
||||
@@ -2006,7 +2030,7 @@
|
||||
@@ -1980,7 +2003,7 @@
|
||||
target: testclasslist-system-keyspace-directory
|
||||
|
||||
j8_dtests_vnode:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2020,7 +2044,7 @@
|
||||
pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests'
|
||||
|
||||
j8_dtests_offheap:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2034,7 +2058,7 @@
|
||||
pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests'
|
||||
|
||||
j11_dtests_vnode:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2049,7 +2073,7 @@
|
||||
pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests'
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -1994,7 +2017,7 @@
|
||||
pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests'
|
||||
|
||||
j11_dtests_offheap:
|
||||
- <<: *j11_par_executor
|
||||
|
|
@ -170,116 +152,53 @@
|
|||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2064,7 +2088,7 @@
|
||||
@@ -2008,7 +2031,7 @@
|
||||
pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests'
|
||||
|
||||
j8_dtests:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_large_par_executor
|
||||
j17_dtests_vnode:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2023,7 +2046,7 @@
|
||||
pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests'
|
||||
|
||||
j17_dtests_offheap:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2078,7 +2102,7 @@
|
||||
pytest_extra_args: '--skip-resource-intensive-tests'
|
||||
@@ -2038,7 +2061,7 @@
|
||||
pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests'
|
||||
|
||||
j11_dtests:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2052,7 +2075,7 @@
|
||||
pytest_extra_args: '--skip-resource-intensive-tests'
|
||||
|
||||
j17_dtests:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2093,7 +2117,7 @@
|
||||
@@ -2067,7 +2090,7 @@
|
||||
pytest_extra_args: '--skip-resource-intensive-tests'
|
||||
|
||||
j11_upgrade_dtests:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_very_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2107,7 +2131,7 @@
|
||||
pytest_extra_args: '--execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all'
|
||||
|
||||
j8_cqlsh_dtests_py3_vnode:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2122,7 +2146,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6'
|
||||
|
||||
j8_cqlsh_dtests_py3_offheap:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2137,7 +2161,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6'
|
||||
|
||||
j8_cqlsh_dtests_py38_vnode:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2155,7 +2179,7 @@
|
||||
python_version: '3.8'
|
||||
|
||||
j8_cqlsh_dtests_py311_vnode:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2173,7 +2197,7 @@
|
||||
python_version: '3.11'
|
||||
|
||||
j8_cqlsh_dtests_py38_offheap:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2191,7 +2215,7 @@
|
||||
python_version: '3.8'
|
||||
|
||||
j8_cqlsh_dtests_py311_offheap:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2209,7 +2233,7 @@
|
||||
python_version: '3.11'
|
||||
|
||||
j8_cqlsh_dtests_py3:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2224,7 +2248,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6'
|
||||
|
||||
j8_cqlsh_dtests_py38:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2242,7 +2266,7 @@
|
||||
python_version: '3.8'
|
||||
|
||||
j8_cqlsh_dtests_py311:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2260,7 +2284,7 @@
|
||||
python_version: '3.11'
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2081,7 +2104,7 @@
|
||||
pytest_extra_args: '--execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all'
|
||||
|
||||
j11_cqlsh_dtests_py3_vnode:
|
||||
- <<: *j11_par_executor
|
||||
|
|
@ -287,7 +206,7 @@
|
|||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2275,7 +2299,7 @@
|
||||
@@ -2096,7 +2119,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6'
|
||||
|
||||
j11_cqlsh_dtests_py3_offheap:
|
||||
|
|
@ -296,7 +215,7 @@
|
|||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2290,7 +2314,7 @@
|
||||
@@ -2111,7 +2134,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6'
|
||||
|
||||
j11_cqlsh_dtests_py38_vnode:
|
||||
|
|
@ -305,7 +224,7 @@
|
|||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2308,7 +2332,7 @@
|
||||
@@ -2129,7 +2152,7 @@
|
||||
python_version: '3.8'
|
||||
|
||||
j11_cqlsh_dtests_py311_vnode:
|
||||
|
|
@ -314,7 +233,7 @@
|
|||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2326,7 +2350,7 @@
|
||||
@@ -2147,7 +2170,7 @@
|
||||
python_version: '3.11'
|
||||
|
||||
j11_cqlsh_dtests_py38_offheap:
|
||||
|
|
@ -323,7 +242,7 @@
|
|||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2344,7 +2368,7 @@
|
||||
@@ -2165,7 +2188,7 @@
|
||||
python_version: '3.8'
|
||||
|
||||
j11_cqlsh_dtests_py311_offheap:
|
||||
|
|
@ -332,7 +251,7 @@
|
|||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2362,7 +2386,7 @@
|
||||
@@ -2183,7 +2206,7 @@
|
||||
python_version: '3.11'
|
||||
|
||||
j11_cqlsh_dtests_py3:
|
||||
|
|
@ -341,7 +260,7 @@
|
|||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2377,7 +2401,7 @@
|
||||
@@ -2198,7 +2221,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6'
|
||||
|
||||
j11_cqlsh_dtests_py38:
|
||||
|
|
@ -350,7 +269,7 @@
|
|||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2395,7 +2419,7 @@
|
||||
@@ -2216,7 +2239,7 @@
|
||||
python_version: '3.8'
|
||||
|
||||
j11_cqlsh_dtests_py311:
|
||||
|
|
@ -359,26 +278,89 @@
|
|||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2413,7 +2437,7 @@
|
||||
@@ -2234,7 +2257,7 @@
|
||||
python_version: '3.11'
|
||||
|
||||
j8_dtests_large_vnode:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_medium_par_executor
|
||||
j17_cqlsh_dtests_py3_vnode:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2427,7 +2451,7 @@
|
||||
pytest_extra_args: '--use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests'
|
||||
@@ -2249,7 +2272,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6'
|
||||
|
||||
j8_dtests_large:
|
||||
- <<: *j8_par_executor
|
||||
+ <<: *j8_medium_par_executor
|
||||
j17_cqlsh_dtests_py3_offheap:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2441,7 +2465,7 @@
|
||||
pytest_extra_args: '--only-resource-intensive-tests --force-resource-intensive-tests'
|
||||
@@ -2264,7 +2287,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6'
|
||||
|
||||
j17_cqlsh_dtests_py38_vnode:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2282,7 +2305,7 @@
|
||||
python_version: '3.8'
|
||||
|
||||
j17_cqlsh_dtests_py311_vnode:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2300,7 +2323,7 @@
|
||||
python_version: '3.11'
|
||||
|
||||
j17_cqlsh_dtests_py38_offheap:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2318,7 +2341,7 @@
|
||||
python_version: '3.8'
|
||||
|
||||
j17_cqlsh_dtests_py311_offheap:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2336,7 +2359,7 @@
|
||||
python_version: '3.11'
|
||||
|
||||
j17_cqlsh_dtests_py3:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2351,7 +2374,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6'
|
||||
|
||||
j17_cqlsh_dtests_py38:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2369,7 +2392,7 @@
|
||||
python_version: '3.8'
|
||||
|
||||
j17_cqlsh_dtests_py311:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2387,7 +2410,7 @@
|
||||
python_version: '3.11'
|
||||
|
||||
j11_dtests_large_vnode:
|
||||
- <<: *j11_par_executor
|
||||
|
|
@ -386,7 +368,7 @@
|
|||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2455,7 +2479,7 @@
|
||||
@@ -2401,7 +2424,7 @@
|
||||
pytest_extra_args: '--use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests'
|
||||
|
||||
j11_dtests_large:
|
||||
|
|
@ -395,3 +377,21 @@
|
|||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2415,7 +2438,7 @@
|
||||
pytest_extra_args: '--only-resource-intensive-tests --force-resource-intensive-tests'
|
||||
|
||||
j17_dtests_large_vnode:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_medium_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2429,7 +2452,7 @@
|
||||
pytest_extra_args: '--use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests'
|
||||
|
||||
j17_dtests_large:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_medium_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,397 +0,0 @@
|
|||
--- config_template_11_and_17.yml 2023-06-16 12:35:53.262925452 +0100
|
||||
+++ config_template_11_and_17.yml.PAID 2023-06-16 12:38:27.607627603 +0100
|
||||
@@ -157,14 +157,14 @@
|
||||
j11_par_executor: &j11_par_executor
|
||||
executor:
|
||||
name: java11-executor
|
||||
- #exec_resource_class: xlarge
|
||||
- parallelism: 4
|
||||
+ exec_resource_class: medium
|
||||
+ parallelism: 25
|
||||
|
||||
j11_small_par_executor: &j11_small_par_executor
|
||||
executor:
|
||||
name: java11-executor
|
||||
- #exec_resource_class: xlarge
|
||||
- parallelism: 1
|
||||
+ exec_resource_class: large
|
||||
+ parallelism: 10
|
||||
|
||||
j11_small_executor: &j11_small_executor
|
||||
executor:
|
||||
@@ -172,30 +172,41 @@
|
||||
exec_resource_class: medium
|
||||
parallelism: 1
|
||||
|
||||
+j11_large_par_executor: &j11_large_par_executor
|
||||
+ executor:
|
||||
+ name: java11-executor
|
||||
+ exec_resource_class: large
|
||||
+ parallelism: 50
|
||||
+
|
||||
+j11_very_large_par_executor: &j11_very_large_par_executor
|
||||
+ executor:
|
||||
+ name: java11-executor
|
||||
+ exec_resource_class: large
|
||||
+ parallelism: 100
|
||||
+
|
||||
j11_medium_par_executor: &j11_medium_par_executor
|
||||
executor:
|
||||
name: java11-executor
|
||||
- #exec_resource_class: xlarge
|
||||
- parallelism: 1
|
||||
+ exec_resource_class: xlarge
|
||||
+ parallelism: 4
|
||||
|
||||
j11_seq_executor: &j11_seq_executor
|
||||
executor:
|
||||
name: java11-executor
|
||||
- #exec_resource_class: xlarge
|
||||
exec_resource_class: medium
|
||||
parallelism: 1 # sequential, single container tests: no parallelism benefits
|
||||
|
||||
j17_par_executor: &j17_par_executor
|
||||
executor:
|
||||
name: java17-executor
|
||||
- #exec_resource_class: xlarge
|
||||
- parallelism: 4
|
||||
+ exec_resource_class: medium
|
||||
+ parallelism: 25
|
||||
|
||||
j17_small_par_executor: &j17_small_par_executor
|
||||
executor:
|
||||
name: java17-executor
|
||||
- #exec_resource_class: xlarge
|
||||
- parallelism: 1
|
||||
+ exec_resource_class: large
|
||||
+ parallelism: 10
|
||||
|
||||
j17_small_executor: &j17_small_executor
|
||||
executor:
|
||||
@@ -206,44 +217,56 @@
|
||||
j17_medium_par_executor: &j17_medium_par_executor
|
||||
executor:
|
||||
name: java17-executor
|
||||
- #exec_resource_class: xlarge
|
||||
- parallelism: 1
|
||||
+ exec_resource_class: xlarge
|
||||
+ parallelism: 4
|
||||
+
|
||||
+j17_large_par_executor: &j17_large_par_executor
|
||||
+ executor:
|
||||
+ name: java17-executor
|
||||
+ exec_resource_class: large
|
||||
+ parallelism: 50
|
||||
|
||||
j17_seq_executor: &j17_seq_executor
|
||||
executor:
|
||||
name: java17-executor
|
||||
- #exec_resource_class: xlarge
|
||||
+ exec_resource_class: medium
|
||||
parallelism: 1 # sequential, single container tests: no parallelism benefits
|
||||
|
||||
j11_repeated_jvm_upgrade_dtest_executor: &j11_repeated_jvm_upgrade_dtest_executor
|
||||
executor:
|
||||
name: java11-executor
|
||||
- parallelism: 4
|
||||
+ exec_resource_class: large
|
||||
+ parallelism: 25
|
||||
|
||||
j11_repeated_utest_executor: &j11_repeated_utest_executor
|
||||
executor:
|
||||
name: java11-executor
|
||||
- parallelism: 4
|
||||
+ exec_resource_class: medium
|
||||
+ parallelism: 25
|
||||
|
||||
j11_repeated_dtest_executor: &j11_repeated_dtest_executor
|
||||
executor:
|
||||
name: java11-executor
|
||||
- parallelism: 4
|
||||
+ exec_resource_class: large
|
||||
+ parallelism: 25
|
||||
|
||||
j17_repeated_utest_executor: &j17_repeated_utest_executor
|
||||
executor:
|
||||
name: java17-executor
|
||||
- parallelism: 4
|
||||
+ exec_resource_class: medium
|
||||
+ parallelism: 25
|
||||
|
||||
j17_repeated_dtest_executor: &j17_repeated_dtest_executor
|
||||
executor:
|
||||
name: java17-executor
|
||||
- parallelism: 4
|
||||
+ exec_resource_class: large
|
||||
+ parallelism: 25
|
||||
|
||||
j11_repeated_upgrade_dtest_executor: &j11_repeated_upgrade_dtest_executor
|
||||
executor:
|
||||
name: java11-executor
|
||||
- parallelism: 4
|
||||
+ exec_resource_class: xlarge
|
||||
+ parallelism: 25
|
||||
|
||||
j11_separate_jobs: &j11_separate_jobs
|
||||
jobs:
|
||||
@@ -1980,7 +2003,7 @@
|
||||
target: testclasslist-system-keyspace-directory
|
||||
|
||||
j11_dtests_vnode:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -1994,7 +2017,7 @@
|
||||
pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests'
|
||||
|
||||
j11_dtests_offheap:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2008,7 +2031,7 @@
|
||||
pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests'
|
||||
|
||||
j17_dtests_vnode:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2023,7 +2046,7 @@
|
||||
pytest_extra_args: '--use-vnodes --num-tokens=16 --skip-resource-intensive-tests'
|
||||
|
||||
j17_dtests_offheap:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2038,7 +2061,7 @@
|
||||
pytest_extra_args: '--use-vnodes --num-tokens=16 --use-off-heap-memtables --skip-resource-intensive-tests'
|
||||
|
||||
j11_dtests:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2052,7 +2075,7 @@
|
||||
pytest_extra_args: '--skip-resource-intensive-tests'
|
||||
|
||||
j17_dtests:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2067,7 +2090,7 @@
|
||||
pytest_extra_args: '--skip-resource-intensive-tests'
|
||||
|
||||
j11_upgrade_dtests:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_very_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2081,7 +2104,7 @@
|
||||
pytest_extra_args: '--execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all'
|
||||
|
||||
j11_cqlsh_dtests_py3_vnode:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2096,7 +2119,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6'
|
||||
|
||||
j11_cqlsh_dtests_py3_offheap:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2111,7 +2134,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6'
|
||||
|
||||
j11_cqlsh_dtests_py38_vnode:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2129,7 +2152,7 @@
|
||||
python_version: '3.8'
|
||||
|
||||
j11_cqlsh_dtests_py311_vnode:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2147,7 +2170,7 @@
|
||||
python_version: '3.11'
|
||||
|
||||
j11_cqlsh_dtests_py38_offheap:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2165,7 +2188,7 @@
|
||||
python_version: '3.8'
|
||||
|
||||
j11_cqlsh_dtests_py311_offheap:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2183,7 +2206,7 @@
|
||||
python_version: '3.11'
|
||||
|
||||
j11_cqlsh_dtests_py3:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2198,7 +2221,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6'
|
||||
|
||||
j11_cqlsh_dtests_py38:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2216,7 +2239,7 @@
|
||||
python_version: '3.8'
|
||||
|
||||
j11_cqlsh_dtests_py311:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2234,7 +2257,7 @@
|
||||
python_version: '3.11'
|
||||
|
||||
j17_cqlsh_dtests_py3_vnode:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2249,7 +2272,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6'
|
||||
|
||||
j17_cqlsh_dtests_py3_offheap:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2264,7 +2287,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6'
|
||||
|
||||
j17_cqlsh_dtests_py38_vnode:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2282,7 +2305,7 @@
|
||||
python_version: '3.8'
|
||||
|
||||
j17_cqlsh_dtests_py311_vnode:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2300,7 +2323,7 @@
|
||||
python_version: '3.11'
|
||||
|
||||
j17_cqlsh_dtests_py38_offheap:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2318,7 +2341,7 @@
|
||||
python_version: '3.8'
|
||||
|
||||
j17_cqlsh_dtests_py311_offheap:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2336,7 +2359,7 @@
|
||||
python_version: '3.11'
|
||||
|
||||
j17_cqlsh_dtests_py3:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2351,7 +2374,7 @@
|
||||
extra_env_args: 'CQLSH_PYTHON=/usr/bin/python3.6'
|
||||
|
||||
j17_cqlsh_dtests_py38:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2369,7 +2392,7 @@
|
||||
python_version: '3.8'
|
||||
|
||||
j17_cqlsh_dtests_py311:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_large_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2387,7 +2410,7 @@
|
||||
python_version: '3.11'
|
||||
|
||||
j11_dtests_large_vnode:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_medium_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2401,7 +2424,7 @@
|
||||
pytest_extra_args: '--use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests'
|
||||
|
||||
j11_dtests_large:
|
||||
- <<: *j11_par_executor
|
||||
+ <<: *j11_medium_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2415,7 +2438,7 @@
|
||||
pytest_extra_args: '--only-resource-intensive-tests --force-resource-intensive-tests'
|
||||
|
||||
j17_dtests_large_vnode:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_medium_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
@@ -2429,7 +2452,7 @@
|
||||
pytest_extra_args: '--use-vnodes --num-tokens=16 --only-resource-intensive-tests --force-resource-intensive-tests'
|
||||
|
||||
j17_dtests_large:
|
||||
- <<: *j17_par_executor
|
||||
+ <<: *j17_medium_par_executor
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/cassandra
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
BASEDIR=`dirname $0`
|
||||
BASEDIR=$(dirname "$0")
|
||||
BASE_BRANCH=trunk
|
||||
set -e
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ print_help()
|
|||
echo "Usage: $0 [-f|-p|-a|-e|-i|-b|-s]"
|
||||
echo " -a Generate the config.yml, config.yml.FREE and config.yml.PAID expanded configuration"
|
||||
echo " files from the main config_template.yml reusable configuration file."
|
||||
echo " Use this for permanent changes in config that will be committed to the main repo."
|
||||
echo " Use this for permanent changes in config.yml that will be committed to the main repo."
|
||||
echo " -f Generate config.yml for tests compatible with the CircleCI free tier resources"
|
||||
echo " -p Generate config.yml for tests compatible with the CircleCI paid tier resources"
|
||||
echo " -b Specify the base git branch for comparison when determining changed tests to"
|
||||
|
|
@ -117,8 +117,8 @@ fi
|
|||
|
||||
# validate environment variables
|
||||
if $has_env_vars && $check_env_vars; then
|
||||
for entry in $(echo $env_vars | tr "|" "\n"); do
|
||||
key=$(echo $entry | tr "=" "\n" | head -n 1)
|
||||
for entry in $(echo "$env_vars" | tr "|" "\n"); do
|
||||
key=$(echo "$entry" | tr "=" "\n" | head -n 1)
|
||||
if [ "$key" != "DTEST_REPO" ] &&
|
||||
[ "$key" != "DTEST_BRANCH" ] &&
|
||||
[ "$key" != "REPEATED_TESTS_STOP_ON_FAILURE" ] &&
|
||||
|
|
@ -155,17 +155,17 @@ fi
|
|||
if $free; then
|
||||
($all || $paid) && die "Cannot use option -f with options -a or -p"
|
||||
echo "Generating new config.yml file for free tier from config_template.yml"
|
||||
circleci config process $BASEDIR/config_template.yml > $BASEDIR/config.yml.FREE.tmp
|
||||
cat $BASEDIR/license.yml $BASEDIR/config.yml.FREE.tmp > $BASEDIR/config.yml
|
||||
rm $BASEDIR/config.yml.FREE.tmp
|
||||
circleci config process "$BASEDIR"/config_template.yml > "$BASEDIR"/config.yml.FREE.tmp
|
||||
cat "$BASEDIR"/license.yml "$BASEDIR"/config.yml.FREE.tmp > "$BASEDIR"/config.yml
|
||||
rm "$BASEDIR"/config.yml.FREE.tmp
|
||||
|
||||
elif $paid; then
|
||||
($all || $free) && die "Cannot use option -p with options -a or -f"
|
||||
echo "Generating new config.yml file for paid tier from config_template.yml"
|
||||
patch -o $BASEDIR/config_template.yml.PAID $BASEDIR/config_template.yml $BASEDIR/config_template.yml.PAID.patch
|
||||
circleci config process $BASEDIR/config_template.yml.PAID > $BASEDIR/config.yml.PAID.tmp
|
||||
cat $BASEDIR/license.yml $BASEDIR/config.yml.PAID.tmp > $BASEDIR/config.yml
|
||||
rm $BASEDIR/config_template.yml.PAID $BASEDIR/config.yml.PAID.tmp
|
||||
patch -o "$BASEDIR"/config_template.yml.PAID "$BASEDIR"/config_template.yml "$BASEDIR"/config_template.yml.PAID.patch
|
||||
circleci config process "$BASEDIR"/config_template.yml.PAID > "$BASEDIR"/config.yml.PAID.tmp
|
||||
cat "$BASEDIR"/license.yml "$BASEDIR"/config.yml.PAID.tmp > "$BASEDIR"/config.yml
|
||||
rm "$BASEDIR"/config_template.yml.PAID "$BASEDIR"/config.yml.PAID.tmp
|
||||
|
||||
elif $all; then
|
||||
($free || $paid || $has_env_vars) && die "Cannot use option -a with options -f, -p or -e"
|
||||
|
|
@ -174,18 +174,18 @@ elif $all; then
|
|||
echo "after running this command if you want them to persist."
|
||||
|
||||
# setup config for free tier
|
||||
circleci config process $BASEDIR/config_template.yml > $BASEDIR/config.yml.FREE.tmp
|
||||
cat $BASEDIR/license.yml $BASEDIR/config.yml.FREE.tmp > $BASEDIR/config.yml.FREE
|
||||
rm $BASEDIR/config.yml.FREE.tmp
|
||||
circleci config process "$BASEDIR"/config_template.yml > "$BASEDIR"/config.yml.FREE.tmp
|
||||
cat "$BASEDIR"/license.yml "$BASEDIR"/config.yml.FREE.tmp > "$BASEDIR"/config.yml.FREE
|
||||
rm "$BASEDIR"/config.yml.FREE.tmp
|
||||
|
||||
# setup config for paid tier
|
||||
patch -o $BASEDIR/config_template.yml.PAID $BASEDIR/config_template.yml $BASEDIR/config_template.yml.PAID.patch
|
||||
circleci config process $BASEDIR/config_template.yml.PAID > $BASEDIR/config.yml.PAID.tmp
|
||||
cat $BASEDIR/license.yml $BASEDIR/config.yml.PAID.tmp > $BASEDIR/config.yml.PAID
|
||||
rm $BASEDIR/config_template.yml.PAID $BASEDIR/config.yml.PAID.tmp
|
||||
patch -o "$BASEDIR"/config_template.yml.PAID "$BASEDIR"/config_template.yml "$BASEDIR"/config_template.yml.PAID.patch
|
||||
circleci config process "$BASEDIR"/config_template.yml.PAID > "$BASEDIR"/config.yml.PAID.tmp
|
||||
cat "$BASEDIR"/license.yml "$BASEDIR"/config.yml.PAID.tmp > "$BASEDIR"/config.yml.PAID
|
||||
rm "$BASEDIR"/config_template.yml.PAID "$BASEDIR"/config.yml.PAID.tmp
|
||||
|
||||
# copy free tier into config.yml to make sure this gets updated
|
||||
cp $BASEDIR/config.yml.FREE $BASEDIR/config.yml
|
||||
cp "$BASEDIR"/config.yml.FREE "$BASEDIR"/config.yml
|
||||
|
||||
elif (! ($has_env_vars)); then
|
||||
print_help
|
||||
|
|
@ -195,7 +195,7 @@ fi
|
|||
# add new or modified tests to the sets of tests to be repeated
|
||||
if $detect_changed_tests; then
|
||||
# Sanity check that the referenced branch exists
|
||||
if ! git show ${BASE_BRANCH} -- >&/dev/null; then
|
||||
if ! git show "${BASE_BRANCH}" -- >&/dev/null; then
|
||||
echo -e "\n\nUnknown base branch: ${BASE_BRANCH}. Unable to detect changed tests.\n"
|
||||
echo "Please use the '-b' option to choose an existing branch name"
|
||||
echo "(e.g. origin/${BASE_BRANCH}, apache/${BASE_BRANCH}, etc.)."
|
||||
|
|
@ -205,18 +205,19 @@ if $detect_changed_tests; then
|
|||
add_diff_tests ()
|
||||
{
|
||||
dir="${BASEDIR}/../${2}"
|
||||
diff=$(git --no-pager diff --name-only --diff-filter=AMR ${BASE_BRANCH}...HEAD ${dir})
|
||||
diff=$(git --no-pager diff --name-only --diff-filter=AMR "${BASE_BRANCH}"...HEAD "${dir}")
|
||||
tests=$( echo "$diff" \
|
||||
| grep "Test\\.java" \
|
||||
| sed -e "s/\\.java//" \
|
||||
| sed -e "s,^${2},," \
|
||||
| tr '/' '.' \
|
||||
| grep ${3} )\
|
||||
| grep "${3}" )\
|
||||
|| : # avoid execution interruptions due to grep return codes and set -e
|
||||
for test in $tests; do
|
||||
echo " $test"
|
||||
has_env_vars=true
|
||||
if echo "$env_vars" | grep -q "${1}="; then
|
||||
# shellcheck disable=SC2001
|
||||
env_vars=$(echo "$env_vars" | sed -e "s/${1}=/${1}=${test},/")
|
||||
elif [ -z "$env_vars" ]; then
|
||||
env_vars="${1}=${test}"
|
||||
|
|
@ -242,12 +243,12 @@ if $has_env_vars; then
|
|||
echo
|
||||
echo "Setting environment variables:"
|
||||
IFS='='
|
||||
echo "$env_vars" | tr '|' '\n' | while read entry; do
|
||||
set -- $entry
|
||||
echo "$env_vars" | tr '|' '\n' | while read -r entry; do
|
||||
set -- "$entry"
|
||||
key=$1
|
||||
val=$2
|
||||
echo " $key: $val"
|
||||
sed -i.bak "s|- $key:.*|- $key: $val|" $BASEDIR/config.yml
|
||||
sed -i.bak "s|- $key:.*|- $key: $val|" "$BASEDIR"/config.yml
|
||||
done
|
||||
unset IFS
|
||||
fi
|
||||
|
|
@ -271,65 +272,64 @@ delete_job()
|
|||
delete_repeated_jobs()
|
||||
{
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_UTESTS=" )); then
|
||||
delete_job "$1" "j8_unit_tests_repeat"
|
||||
delete_job "$1" "j11_unit_tests_repeat"
|
||||
delete_job "$1" "j8_utests_cdc_repeat"
|
||||
delete_job "$1" "j17_unit_tests_repeat"
|
||||
delete_job "$1" "j11_utests_cdc_repeat"
|
||||
delete_job "$1" "j8_utests_compression_repeat"
|
||||
delete_job "$1" "j17_utests_cdc_repeat"
|
||||
delete_job "$1" "j11_utests_compression_repeat"
|
||||
delete_job "$1" "j8_utests_trie_repeat"
|
||||
delete_job "$1" "j17_utests_compression_repeat"
|
||||
delete_job "$1" "j11_utests_trie_repeat"
|
||||
delete_job "$1" "j8_utests_oa_repeat"
|
||||
delete_job "$1" "j17_utests_trie_repeat"
|
||||
delete_job "$1" "j11_utests_oa_repeat"
|
||||
delete_job "$1" "j8_utests_system_keyspace_directory_repeat"
|
||||
delete_job "$1" "j17_utests_oa_repeat"
|
||||
delete_job "$1" "j11_utests_system_keyspace_directory_repeat"
|
||||
delete_job "$1" "j17_utests_system_keyspace_directory_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_UTESTS_LONG=")); then
|
||||
delete_job "$1" "j8_utests_long_repeat"
|
||||
delete_job "$1" "j11_utests_long_repeat"
|
||||
delete_job "$1" "j17_utests_long_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_UTESTS_STRESS=")); then
|
||||
delete_job "$1" "j8_utests_stress_repeat"
|
||||
delete_job "$1" "j11_utests_stress_repeat"
|
||||
delete_job "$1" "j17_utests_stress_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_UTESTS_FQLTOOL=")); then
|
||||
delete_job "$1" "j8_utests_fqltool_repeat"
|
||||
delete_job "$1" "j11_utests_fqltool_repeat"
|
||||
delete_job "$1" "j17_utests_fqltool_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_SIMULATOR_DTESTS=")); then
|
||||
delete_job "$1" "j8_simulator_dtests_repeat"
|
||||
delete_job "$1" "j11_simulator_dtests_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_JVM_DTESTS=")); then
|
||||
delete_job "$1" "j8_jvm_dtests_repeat"
|
||||
delete_job "$1" "j8_jvm_dtests_vnode_repeat"
|
||||
delete_job "$1" "j11_jvm_dtests_repeat"
|
||||
delete_job "$1" "j11_jvm_dtests_vnode_repeat"
|
||||
delete_job "$1" "j17_jvm_dtests_repeat"
|
||||
delete_job "$1" "j17_jvm_dtests_vnode_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_JVM_UPGRADE_DTESTS=")); then
|
||||
delete_job "$1" "start_jvm_upgrade_dtests_repeat"
|
||||
delete_job "$1" "j11_jvm_upgrade_dtests_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_DTESTS=")); then
|
||||
delete_job "$1" "j8_dtests_repeat"
|
||||
delete_job "$1" "j8_dtests_vnode_repeat"
|
||||
delete_job "$1" "j8_dtests_offheap_repeat"
|
||||
delete_job "$1" "j11_dtests_repeat"
|
||||
delete_job "$1" "j11_dtests_vnode_repeat"
|
||||
delete_job "$1" "j11_dtests_offheap_repeat"
|
||||
delete_job "$1" "j17_dtests_repeat"
|
||||
delete_job "$1" "j17_dtests_vnode_repeat"
|
||||
delete_job "$1" "j17_dtests_offheap_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_LARGE_DTESTS=")); then
|
||||
delete_job "$1" "j8_dtests_large_repeat"
|
||||
delete_job "$1" "j8_dtests_large_vnode_repeat"
|
||||
delete_job "$1" "j11_dtests_large_repeat"
|
||||
delete_job "$1" "j11_dtests_large_vnode_repeat"
|
||||
delete_job "$1" "j17_dtests_large_repeat"
|
||||
delete_job "$1" "j17_dtests_large_vnode_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_UPGRADE_DTESTS=")); then
|
||||
delete_job "$1" "j11_upgrade_dtests_repeat"
|
||||
delete_job "$1" "j11_upgrade_dtests_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_ANT_TEST_CLASS=")); then
|
||||
delete_job "$1" "j8_repeated_ant_test"
|
||||
delete_job "$1" "j11_repeated_ant_test"
|
||||
delete_job "$1" "j17_repeated_ant_test"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,343 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
BASEDIR=`dirname $0`
|
||||
BASE_BRANCH=trunk
|
||||
set -e
|
||||
|
||||
die ()
|
||||
{
|
||||
echo "ERROR: $*"
|
||||
print_help
|
||||
exit 1
|
||||
}
|
||||
|
||||
print_help()
|
||||
{
|
||||
echo "Usage: $0 [-f|-p|-a|-e|-i|-b|-s]"
|
||||
echo " -a Generate the config_11_and_17.yml, config_11_and_17.yml.FREE and config_11_and_17.yml.PAID expanded configuration"
|
||||
echo " files from the main config_template.yml reusable configuration file."
|
||||
echo " Use this for permanent changes in config_11_and_17.yml that will be committed to the main repo."
|
||||
echo " -f Generate config.yml for tests compatible with the CircleCI free tier resources"
|
||||
echo " -p Generate config.yml for tests compatible with the CircleCI paid tier resources"
|
||||
echo " -b Specify the base git branch for comparison when determining changed tests to"
|
||||
echo " repeat. Defaults to ${BASE_BRANCH}. Note that this option is not used when"
|
||||
echo " the '-a' option is specified."
|
||||
echo " -s Skip automatic detection of changed tests. Useful when you need to repeat a few ones,"
|
||||
echo " or when there are too many changed tests for CircleCI."
|
||||
echo " -e <key=value> Environment variables to be used in the generated config_11_and_17.yml, e.g.:"
|
||||
echo " -e DTEST_BRANCH=CASSANDRA-8272"
|
||||
echo " -e DTEST_REPO=https://github.com/adelapena/cassandra-dtest.git"
|
||||
echo " -e REPEATED_TESTS_STOP_ON_FAILURE=false"
|
||||
echo " -e REPEATED_UTESTS=org.apache.cassandra.cql3.ViewTest#testCountersTable"
|
||||
echo " -e REPEATED_UTESTS_COUNT=500"
|
||||
echo " -e REPEATED_UTESTS_FQLTOOL=org.apache.cassandra.fqltool.FQLCompareTest"
|
||||
echo " -e REPEATED_UTESTS_FQLTOOL_COUNT=500"
|
||||
echo " -e REPEATED_UTESTS_LONG=org.apache.cassandra.db.commitlog.CommitLogStressTest"
|
||||
echo " -e REPEATED_UTESTS_LONG_COUNT=100"
|
||||
echo " -e REPEATED_UTESTS_STRESS=org.apache.cassandra.stress.generate.DistributionGaussianTest"
|
||||
echo " -e REPEATED_UTESTS_STRESS_COUNT=500"
|
||||
echo " -e REPEATED_SIMULATOR_DTESTS=org.apache.cassandra.simulator.test.TrivialSimulationTest"
|
||||
echo " -e REPEATED_SIMULATOR_DTESTS_COUNT=500"
|
||||
echo " -e REPEATED_JVM_DTESTS=org.apache.cassandra.distributed.test.PagingTest"
|
||||
echo " -e REPEATED_JVM_DTESTS_COUNT=500"
|
||||
echo " -e REPEATED_JVM_UPGRADE_DTESTS=org.apache.cassandra.distributed.upgrade.GroupByTest"
|
||||
echo " -e REPEATED_JVM_UPGRADE_DTESTS_COUNT=500"
|
||||
echo " -e REPEATED_DTESTS=cdc_test.py cqlsh_tests/test_cqlsh.py::TestCqlshSmoke"
|
||||
echo " -e REPEATED_DTESTS_COUNT=500"
|
||||
echo " -e REPEATED_LARGE_DTESTS=replace_address_test.py::TestReplaceAddress::test_replace_stopped_node"
|
||||
echo " -e REPEATED_LARGE_DTESTS=100"
|
||||
echo " -e REPEATED_UPGRADE_DTESTS=upgrade_tests/cql_tests.py upgrade_tests/paging_test.py"
|
||||
echo " -e REPEATED_UPGRADE_DTESTS_COUNT=25"
|
||||
echo " -e REPEATED_ANT_TEST_TARGET=testsome"
|
||||
echo " -e REPEATED_ANT_TEST_CLASS=org.apache.cassandra.cql3.ViewTest"
|
||||
echo " -e REPEATED_ANT_TEST_METHODS=testCompoundPartitionKey,testStaticTable"
|
||||
echo " -e REPEATED_ANT_TEST_VNODES=false"
|
||||
echo " -e REPEATED_ANT_TEST_COUNT=500"
|
||||
echo " For the complete list of environment variables, please check the"
|
||||
echo " list of examples in config_template_11_and_17.yml and/or the documentation."
|
||||
echo " If you want to specify multiple environment variables simply add"
|
||||
echo " multiple -e options. The flags -f/-p should be used when using -e."
|
||||
echo " -i Ignore unknown environment variables"
|
||||
}
|
||||
|
||||
all=false
|
||||
free=false
|
||||
paid=false
|
||||
env_vars=""
|
||||
has_env_vars=false
|
||||
check_env_vars=true
|
||||
detect_changed_tests=true
|
||||
while getopts "e:afpib:s" opt; do
|
||||
case $opt in
|
||||
a ) all=true
|
||||
detect_changed_tests=false
|
||||
;;
|
||||
f ) free=true
|
||||
;;
|
||||
p ) paid=true
|
||||
;;
|
||||
e ) if (! ($has_env_vars)); then
|
||||
env_vars="$OPTARG"
|
||||
else
|
||||
env_vars="$env_vars|$OPTARG"
|
||||
fi
|
||||
has_env_vars=true
|
||||
;;
|
||||
b ) BASE_BRANCH="$OPTARG"
|
||||
;;
|
||||
i ) check_env_vars=false
|
||||
;;
|
||||
s ) detect_changed_tests=false
|
||||
;;
|
||||
\?) die "Invalid option: -$OPTARG"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
if [ "$#" -ne 0 ]; then
|
||||
die "Unexpected arguments"
|
||||
fi
|
||||
|
||||
# validate environment variables
|
||||
if $has_env_vars && $check_env_vars; then
|
||||
for entry in $(echo $env_vars | tr "|" "\n"); do
|
||||
key=$(echo $entry | tr "=" "\n" | head -n 1)
|
||||
if [ "$key" != "DTEST_REPO" ] &&
|
||||
[ "$key" != "DTEST_BRANCH" ] &&
|
||||
[ "$key" != "REPEATED_TESTS_STOP_ON_FAILURE" ] &&
|
||||
[ "$key" != "REPEATED_UTESTS" ] &&
|
||||
[ "$key" != "REPEATED_UTESTS_COUNT" ] &&
|
||||
[ "$key" != "REPEATED_UTESTS_FQLTOOL" ] &&
|
||||
[ "$key" != "REPEATED_UTESTS_FQLTOOL_COUNT" ] &&
|
||||
[ "$key" != "REPEATED_UTESTS_LONG" ] &&
|
||||
[ "$key" != "REPEATED_UTESTS_LONG_COUNT" ] &&
|
||||
[ "$key" != "REPEATED_UTESTS_STRESS" ] &&
|
||||
[ "$key" != "REPEATED_UTESTS_STRESS_COUNT" ] &&
|
||||
[ "$key" != "REPEATED_SIMULATOR_DTESTS" ] &&
|
||||
[ "$key" != "REPEATED_SIMULATOR_DTESTS_COUNT" ] &&
|
||||
[ "$key" != "REPEATED_JVM_DTESTS" ] &&
|
||||
[ "$key" != "REPEATED_JVM_DTESTS_COUNT" ] &&
|
||||
[ "$key" != "REPEATED_JVM_UPGRADE_DTESTS" ] &&
|
||||
[ "$key" != "REPEATED_JVM_UPGRADE_DTESTS_COUNT" ] &&
|
||||
[ "$key" != "REPEATED_DTESTS" ] &&
|
||||
[ "$key" != "REPEATED_DTESTS_COUNT" ] &&
|
||||
[ "$key" != "REPEATED_LARGE_DTESTS" ] &&
|
||||
[ "$key" != "REPEATED_LARGE_DTESTS_COUNT" ] &&
|
||||
[ "$key" != "REPEATED_UPGRADE_DTESTS" ] &&
|
||||
[ "$key" != "REPEATED_UPGRADE_DTESTS_COUNT" ] &&
|
||||
[ "$key" != "REPEATED_ANT_TEST_TARGET" ] &&
|
||||
[ "$key" != "REPEATED_ANT_TEST_CLASS" ] &&
|
||||
[ "$key" != "REPEATED_ANT_TEST_METHODS" ] &&
|
||||
[ "$key" != "REPEATED_ANT_TEST_VNODES" ] &&
|
||||
[ "$key" != "REPEATED_ANT_TEST_COUNT" ]; then
|
||||
die "Unrecognised environment variable name: $key"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if $free; then
|
||||
($all || $paid) && die "Cannot use option -f with options -a or -p"
|
||||
echo "Generating new config.yml file for free tier from config_template_11_and_17.yml"
|
||||
circleci config process $BASEDIR/config_template_11_and_17.yml > $BASEDIR/config_11_and_17.yml.FREE.tmp
|
||||
cat $BASEDIR/license.yml $BASEDIR/config_11_and_17.yml.FREE.tmp > $BASEDIR/config.yml
|
||||
cp $BASEDIR/config.yml $BASEDIR/config_11_and_17.yml
|
||||
rm $BASEDIR/config_11_and_17.yml.FREE.tmp
|
||||
|
||||
elif $paid; then
|
||||
($all || $free) && die "Cannot use option -p with options -a or -f"
|
||||
echo "Generating new config.yml file for paid tier from config_template_11_and_17.yml"
|
||||
patch -o $BASEDIR/config_template_11_and_17.yml.PAID $BASEDIR/config_template_11_and_17.yml $BASEDIR/config_template_11_and_17.yml.PAID.patch
|
||||
circleci config process $BASEDIR/config_template_11_and_17.yml.PAID > $BASEDIR/config_11_and_17.yml.PAID.tmp
|
||||
cat $BASEDIR/license.yml $BASEDIR/config_11_and_17.yml.PAID.tmp > $BASEDIR/config.yml
|
||||
cp $BASEDIR/config.yml $BASEDIR/config_11_and_17.yml
|
||||
rm $BASEDIR/config_template_11_and_17.yml.PAID $BASEDIR/config_11_and_17.yml.PAID.tmp
|
||||
|
||||
elif $all; then
|
||||
($free || $paid || $has_env_vars) && die "Cannot use option -a with options -f, -p or -e"
|
||||
echo "Generating new default config_11_and_17.yml file for free tier and FREE/PAID templates from config_template_11_and_17.yml."
|
||||
echo "Make sure you commit the newly generated config_11_and_17.yml, config_11_and_17.yml.FREE and config_11_and_17.yml.PAID files"
|
||||
echo "after running this command if you want them to persist."
|
||||
|
||||
# setup config for free tier
|
||||
circleci config process $BASEDIR/config_template_11_and_17.yml > $BASEDIR/config_11_and_17.yml.FREE.tmp
|
||||
cat $BASEDIR/license.yml $BASEDIR/config_11_and_17.yml.FREE.tmp > $BASEDIR/config_11_and_17.yml.FREE
|
||||
rm $BASEDIR/config_11_and_17.yml.FREE.tmp
|
||||
|
||||
# setup config for paid tier
|
||||
patch -o $BASEDIR/config_template_11_and_17.yml.PAID $BASEDIR/config_template_11_and_17.yml $BASEDIR/config_template_11_and_17.yml.PAID.patch
|
||||
circleci config process $BASEDIR/config_template_11_and_17.yml.PAID > $BASEDIR/config_11_and_17.yml.PAID.tmp
|
||||
cat $BASEDIR/license.yml $BASEDIR/config_11_and_17.yml.PAID.tmp > $BASEDIR/config_11_and_17.yml.PAID
|
||||
rm $BASEDIR/config_template_11_and_17.yml.PAID $BASEDIR/config_11_and_17.yml.PAID.tmp
|
||||
|
||||
# copy free tier into config_11_and_17.yml to make sure this gets updated
|
||||
cp $BASEDIR/config_11_and_17.yml.FREE $BASEDIR/config_11_and_17.yml
|
||||
|
||||
elif (! ($has_env_vars)); then
|
||||
print_help
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# add new or modified tests to the sets of tests to be repeated
|
||||
if $detect_changed_tests; then
|
||||
# Sanity check that the referenced branch exists
|
||||
if ! git show ${BASE_BRANCH} -- >&/dev/null; then
|
||||
echo -e "\n\nUnknown base branch: ${BASE_BRANCH}. Unable to detect changed tests.\n"
|
||||
echo "Please use the '-b' option to choose an existing branch name"
|
||||
echo "(e.g. origin/${BASE_BRANCH}, apache/${BASE_BRANCH}, etc.)."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
add_diff_tests ()
|
||||
{
|
||||
dir="${BASEDIR}/../${2}"
|
||||
diff=$(git --no-pager diff --name-only --diff-filter=AMR ${BASE_BRANCH}...HEAD ${dir})
|
||||
tests=$( echo "$diff" \
|
||||
| grep "Test\\.java" \
|
||||
| sed -e "s/\\.java//" \
|
||||
| sed -e "s,^${2},," \
|
||||
| tr '/' '.' \
|
||||
| grep ${3} )\
|
||||
|| : # avoid execution interruptions due to grep return codes and set -e
|
||||
for test in $tests; do
|
||||
echo " $test"
|
||||
has_env_vars=true
|
||||
if echo "$env_vars" | grep -q "${1}="; then
|
||||
env_vars=$(echo "$env_vars" | sed -e "s/${1}=/${1}=${test},/")
|
||||
elif [ -z "$env_vars" ]; then
|
||||
env_vars="${1}=${test}"
|
||||
else
|
||||
env_vars="$env_vars|${1}=${test}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
echo
|
||||
echo "Detecting new or modified tests with git diff --diff-filter=AMR ${BASE_BRANCH}...HEAD:"
|
||||
add_diff_tests "REPEATED_UTESTS" "test/unit/" "org.apache.cassandra"
|
||||
add_diff_tests "REPEATED_UTESTS_LONG" "test/long/" "org.apache.cassandra"
|
||||
add_diff_tests "REPEATED_UTESTS_STRESS" "tools/stress/test/unit/" "org.apache.cassandra.stress"
|
||||
add_diff_tests "REPEATED_UTESTS_FQLTOOL" "tools/fqltool/test/unit/" "org.apache.cassandra.fqltool"
|
||||
add_diff_tests "REPEATED_SIMULATOR_DTESTS" "test/simulator/test/" "org.apache.cassandra.simulator.test"
|
||||
add_diff_tests "REPEATED_JVM_DTESTS" "test/distributed/" "org.apache.cassandra.distributed.test"
|
||||
add_diff_tests "REPEATED_JVM_UPGRADE_DTESTS" "test/distributed/" "org.apache.cassandra.distributed.upgrade"
|
||||
fi
|
||||
|
||||
# replace environment variables
|
||||
if $has_env_vars; then
|
||||
echo
|
||||
echo "Setting environment variables:"
|
||||
IFS='='
|
||||
echo "$env_vars" | tr '|' '\n' | while read entry; do
|
||||
set -- $entry
|
||||
key=$1
|
||||
val=$2
|
||||
echo " $key: $val"
|
||||
sed -i.bak "s|- $key:.*|- $key: $val|" $BASEDIR/config.yml
|
||||
cp $BASEDIR/config.yml $BASEDIR/config_11_and_17.yml
|
||||
done
|
||||
unset IFS
|
||||
fi
|
||||
|
||||
# Define function to remove unneeded jobs.
|
||||
# The first argument is the file name, and the second arguemnt is the job name.
|
||||
delete_job()
|
||||
{
|
||||
delete_yaml_block()
|
||||
{
|
||||
sed -Ei.bak "/^ - ${2}/,/^ [^[:space:]]+|^ [^[:space:]]+/{//!d;}" "$1"
|
||||
sed -Ei.bak "/^ - ${2}/d" "$1"
|
||||
}
|
||||
file="$BASEDIR/$1"
|
||||
delete_yaml_block "$file" "${2}"
|
||||
delete_yaml_block "$file" "start_${2}"
|
||||
}
|
||||
|
||||
# Define function to remove any unneeded repeated jobs.
|
||||
# The first and only argument is the file name.
|
||||
delete_repeated_jobs()
|
||||
{
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_UTESTS=" )); then
|
||||
delete_job "$1" "j11_unit_tests_repeat"
|
||||
delete_job "$1" "j17_unit_tests_repeat"
|
||||
delete_job "$1" "j11_utests_cdc_repeat"
|
||||
delete_job "$1" "j17_utests_cdc_repeat"
|
||||
delete_job "$1" "j11_utests_compression_repeat"
|
||||
delete_job "$1" "j17_utests_compression_repeat"
|
||||
delete_job "$1" "j11_utests_trie_repeat"
|
||||
delete_job "$1" "j17_utests_trie_repeat"
|
||||
delete_job "$1" "j11_utests_oa_repeat"
|
||||
delete_job "$1" "j17_utests_oa_repeat"
|
||||
delete_job "$1" "j11_utests_system_keyspace_directory_repeat"
|
||||
delete_job "$1" "j17_utests_system_keyspace_directory_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_UTESTS_LONG=")); then
|
||||
delete_job "$1" "j11_utests_long_repeat"
|
||||
delete_job "$1" "j17_utests_long_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_UTESTS_STRESS=")); then
|
||||
delete_job "$1" "j11_utests_stress_repeat"
|
||||
delete_job "$1" "j17_utests_stress_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_UTESTS_FQLTOOL=")); then
|
||||
delete_job "$1" "j11_utests_fqltool_repeat"
|
||||
delete_job "$1" "j17_utests_fqltool_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_SIMULATOR_DTESTS=")); then
|
||||
delete_job "$1" "j11_simulator_dtests_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_JVM_DTESTS=")); then
|
||||
delete_job "$1" "j11_jvm_dtests_repeat"
|
||||
delete_job "$1" "j11_jvm_dtests_vnode_repeat"
|
||||
delete_job "$1" "j17_jvm_dtests_repeat"
|
||||
delete_job "$1" "j17_jvm_dtests_vnode_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_JVM_UPGRADE_DTESTS=")); then
|
||||
delete_job "$1" "start_jvm_upgrade_dtests_repeat"
|
||||
delete_job "$1" "j11_jvm_upgrade_dtests_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_DTESTS=")); then
|
||||
delete_job "$1" "j11_dtests_repeat"
|
||||
delete_job "$1" "j11_dtests_vnode_repeat"
|
||||
delete_job "$1" "j11_dtests_offheap_repeat"
|
||||
delete_job "$1" "j17_dtests_repeat"
|
||||
delete_job "$1" "j17_dtests_vnode_repeat"
|
||||
delete_job "$1" "j17_dtests_offheap_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_LARGE_DTESTS=")); then
|
||||
delete_job "$1" "j11_dtests_large_repeat"
|
||||
delete_job "$1" "j11_dtests_large_vnode_repeat"
|
||||
delete_job "$1" "j17_dtests_large_repeat"
|
||||
delete_job "$1" "j17_dtests_large_vnode_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_UPGRADE_DTESTS=")); then
|
||||
delete_job "$1" "j11_upgrade_dtests_repeat"
|
||||
fi
|
||||
if (! (echo "$env_vars" | grep -q "REPEATED_ANT_TEST_CLASS=")); then
|
||||
delete_job "$1" "j11_repeated_ant_test"
|
||||
delete_job "$1" "j17_repeated_ant_test"
|
||||
fi
|
||||
}
|
||||
|
||||
delete_repeated_jobs "config.yml"
|
||||
delete_repeated_jobs "config_11_and_17.yml"
|
||||
if $all; then
|
||||
delete_repeated_jobs "config_11_and_17.yml.FREE"
|
||||
delete_repeated_jobs "config_11_and_17.yml.PAID"
|
||||
fi
|
||||
|
|
@ -23,18 +23,12 @@
|
|||
This directory contains the configuration for CircleCI continous integration platform.
|
||||
The file `config.yml` is the configuration file that is read by CircleCI. This file is
|
||||
automatically generated by the `generate.sh` script from the `config_template.yml` file.
|
||||
Experimental JDK17 configuration is added for test purposes to enable easier testing
|
||||
while working on JDK17 related issues. The file `config_11_and_17.yml` is the configuration
|
||||
file that we can copy over `config.yml` to test JDK11+17 workflows. This file is automatically
|
||||
generated by the `generate_11_and_17.sh` script from the `config_template_11_and_17.yml` file.
|
||||
|
||||
The provided `config.yml` file uses low resources so users of the CircleCI free tier can
|
||||
use it. Additionally, there are two versions of this file using different resources so
|
||||
users who have access to premium CircleCI resources can use larger instances and more
|
||||
parallelism. These files are `config.yml.FREE` and `config.yml.PAID`.
|
||||
The default `config.yml` file is just a copy of `config.yml.FREE`.
|
||||
For the JDK11+17 workflows we have equivalent files - `config_11_and_17.yml.FREE` and
|
||||
`config_11_and_17.yml.PAID`.
|
||||
|
||||
## Switching to higher resource settings
|
||||
This directory contains generated files for free and paid resource settings.
|
||||
|
|
@ -43,39 +37,27 @@ For example, for using higher resources benefiting from CircleCI's paid tier:
|
|||
|
||||
`cp .circleci/config.yml.PAID .circleci/config.yml`
|
||||
|
||||
respectively for JDK11+17:
|
||||
|
||||
`cp .circleci/config_11_and_17.yml.PAID .circleci/config.yml`
|
||||
|
||||
And for using lower resources comaptible with CircleCI's free tier:
|
||||
|
||||
`cp .circleci/config.yml.FREE .circleci/config.yml`
|
||||
|
||||
respectively for JDK11+17:
|
||||
|
||||
`cp .circleci/config_11_and_17.yml.FREE .circleci/config.yml`
|
||||
|
||||
Alternatively, you can run the `generate.sh` script with the flags `-f`/`-p`
|
||||
to regenerate the `config.yml` file from `config_template.yml` using free or paid resources.
|
||||
For JDK11 and 17 you can run the `generate_11_and_17.sh` script with the flags
|
||||
`-f`/`-p` to regenerate the `config.yml` file from `config_template_11_and_17.yml`
|
||||
using free or paid resources. The two scripts validate and apply any changes to the
|
||||
`config_template.yml`and `config_template_11_and_17.yml` files, and they require the
|
||||
to regenerate the `config.yml` file from `config_template.yml` using free or paid resources.
|
||||
The script validates and applies any changes to the `config_template.yml` file, and they require the
|
||||
[CircleCI CLI](https://circleci.com/docs/2.0/local-cli/#install) to be installed.
|
||||
|
||||
## Setting environment variables
|
||||
Both `config_template.yml` and `config.yml` files contain a set of environment variables
|
||||
defining things like what dtest repo and branch to use, what tests could be repeatedly
|
||||
run, etc. Same applies for `config_template_11_and_17.yml` and `config_11_and_17.yml`.
|
||||
run, etc.
|
||||
|
||||
These environment variables can be directly edited in the `config.yml` file, although if
|
||||
you do this you should take into account that the entire set of env vars is repeated on
|
||||
every job.
|
||||
|
||||
A probably better approach is editing them in `config_template.yml` or respectively
|
||||
`config_template_11_and_17.yml` and then regenerate the `config.yml` and `config_11_and_17.yml`
|
||||
files using the `generate.sh` or respectively the `generate_11_and_17.yml` script. You can also
|
||||
directly pass environment variable values to the `generate.sh` and `generate_11_and_17.sh` scripts
|
||||
A probably better approach is editing them in `config_template.yml` and then regenerate the `config.yml`
|
||||
files using the `generate.sh` script. You can also
|
||||
directly pass environment variable values to the `generate.sh` script
|
||||
with the `-e` flag. For example, to set the dtest repo and branch with PAID config
|
||||
you can run:
|
||||
|
||||
|
|
@ -87,10 +69,10 @@ generate.sh -p \
|
|||
```
|
||||
|
||||
## Running tests in a loop
|
||||
Running the `generate.sh` or `generate_11_and_17.sh` script will use `git diff` to find the
|
||||
new or modified tests. The scripts will then create jobs to run each of these new or modified
|
||||
tests for a certain number of times, to verify that they are stable. You can use environment
|
||||
variables to specify the number of iterations of each type of test:
|
||||
Running the `generate.sh` script will use `git diff` to find the new or modified tests.
|
||||
The scripts will then create jobs to run each of these new or modified tests for a certain number
|
||||
of times, to verify that they are stable. You can use environment variables to specify the number of
|
||||
iterations of each type of test:
|
||||
```
|
||||
generate.sh -p \
|
||||
-e REPEATED_UTESTS_COUNT=500 \
|
||||
|
|
@ -178,7 +160,6 @@ the `config.yml` file manually. Instead, you should edit the `config_template.ym
|
|||
regenerate the `config.yml`, `config.yml.FREE` and `config.yml.PAID`
|
||||
files by runnining the `generate.sh` script with `-a` flag. For using this script you
|
||||
need to install the [CircleCI CLI](https://circleci.com/docs/2.0/local-cli/#install).
|
||||
Same applies for the equivalent JDK11+17 config files and `generate_11_and_17.sh`.
|
||||
|
||||
As for temporal changes done while working in a patch, such as pointing to you dtest repo or
|
||||
running a test repeatedly, you can either directly edit `config.yml` or edit `config_template.yml`
|
||||
|
|
@ -187,9 +168,9 @@ When this flag is used only the `config.yml` will be generated. Same workflow ap
|
|||
JDK11+17 CircleCI configuration files.
|
||||
|
||||
Please note that any previous swapping or edition of the generated files will be overriden
|
||||
by running `generate.sh`/`generate_11_and_17.sh` with `-a` argument, returning `config.yml`
|
||||
to the default FREE. So if you previously swapped your `config.yml` to PAID you would need to
|
||||
either swap it again or use the `-f`/`-p` script flags.
|
||||
by running `generate.sh` with `-a` argument, returning `config.yml`to the default FREE.
|
||||
So if you previously swapped your `config.yml` to PAID you would need to either swap it again
|
||||
or use the `-f`/`-p` script flags.
|
||||
|
||||
Read below for details how to generate the files manually without the `generate.sh` script:
|
||||
|
||||
|
|
@ -212,4 +193,3 @@ Read below for details how to generate the files manually without the `generate.
|
|||
`cat license.yml config.yml.PAID > config.yml.PAID.new && mv config.yml.PAID.new config.yml.PAID`
|
||||
8. finally, remember to update the config.yml
|
||||
|
||||
The process is equivalent for `generate_11_and_17.sh` and the respective JDK11+17 configuration files.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
5.0
|
||||
* Drop JDK8, add JDK17 (CASSANDRA-18255)
|
||||
* Remove WaitingOnFreeMemtableSpace and DroppedMutations metrics (CASSANDRA-18298)
|
||||
* Upgrade Jamm version to 0.4.0 (CASSANDRA-17884, CASSANDRA-16304, CASSANDRA-18329)
|
||||
* Remove legacy 3.0/3.11 buffer pool metrics (CASSANDRA-18313)
|
||||
|
|
|
|||
4
NEWS.txt
4
NEWS.txt
|
|
@ -71,6 +71,9 @@ using the provided 'sstableupgrade' tool.
|
|||
|
||||
New features
|
||||
------------
|
||||
- *Experimental* support for Java 17 has been added. JVM options that differ between or are
|
||||
specific for Java 17 have been added into jvm17.options.
|
||||
IMPORTANT: Running C* on Java 17 is *experimental* and do it at your own risk.
|
||||
- Added a new "unified" compaction strategy that supports the use cases of the legacy compaction strategies, with
|
||||
low space overhead, high parallelism and flexible configuration. Implemented by the UnifiedCompactionStrategy
|
||||
class. Further details and documentation can be found in
|
||||
|
|
@ -176,6 +179,7 @@ New features
|
|||
|
||||
Upgrading
|
||||
---------
|
||||
- Java 8 has been removed. Lowest supported version is Java 11.
|
||||
- Ephemeral marker files for snapshots done by repairs are not created anymore,
|
||||
there is a dedicated flag in snapshot manifest instead. On upgrade of a node to this version, on node's start, in case there
|
||||
are such ephemeral snapshots on disk, they will be deleted (same behaviour as before) and any new ephemeral snapshots
|
||||
|
|
|
|||
|
|
@ -117,21 +117,7 @@ JVM_VERSION=${jvmver%_*}
|
|||
short=$(echo "${jvmver}" | cut -c1-2)
|
||||
|
||||
JAVA_VERSION=17
|
||||
if [ "$JVM_VERSION" = "1.8.0" ] ; then
|
||||
JVM_PATCH_VERSION=${jvmver#*_}
|
||||
if [ "$JVM_VERSION" \< "1.8" ] || [ "$JVM_VERSION" \> "1.8.2" ] ; then
|
||||
echo "Cassandra 4.0 requires either Java 8 (update 151 or newer) or Java 11 (or newer). Java $JVM_VERSION is not supported."
|
||||
exit 1;
|
||||
fi
|
||||
if [ "$JVM_PATCH_VERSION" -lt 151 ] ; then
|
||||
echo "Cassandra 4.0 requires either Java 8 (update 151 or newer) or Java 11 (or newer). Java 8 update $JVM_PATCH_VERSION is not supported."
|
||||
exit 1;
|
||||
fi
|
||||
JAVA_VERSION=8
|
||||
elif [ "$JVM_VERSION" \< "11" ] ; then
|
||||
echo "Cassandra 4.0 requires either Java 8 (update 151 or newer) or Java 11 (or newer)."
|
||||
exit 1;
|
||||
elif [ "$short" = "11" ] ; then
|
||||
if [ "$short" = "11" ] ; then
|
||||
JAVA_VERSION=11
|
||||
elif [ "$JVM_VERSION" \< "17" ] ; then
|
||||
echo "Cassandra 5.0 requires Java 11 or Java 17."
|
||||
|
|
@ -163,8 +149,6 @@ if [ $JAVA_VERSION -ge 17 ] ; then
|
|||
JVM_DEP_OPTS_FILE=$CASSANDRA_CONF/jvm17${jvmoptions_variant:--clients}.options
|
||||
elif [ $JAVA_VERSION -ge 11 ] ; then
|
||||
JVM_DEP_OPTS_FILE=$CASSANDRA_CONF/jvm11${jvmoptions_variant:--clients}.options
|
||||
else
|
||||
JVM_DEP_OPTS_FILE=$CASSANDRA_CONF/jvm8${jvmoptions_variant:--clients}.options
|
||||
fi
|
||||
|
||||
for opt in `grep "^-" $JVM_OPTS_FILE` `grep "^-" $JVM_DEP_OPTS_FILE`
|
||||
|
|
|
|||
81
build.xml
81
build.xml
|
|
@ -43,8 +43,8 @@
|
|||
When building, javac's source and target flags are set to the jdk used, so lower JDKs are not supported at runtime.
|
||||
The use of both CASSANDRA_USE_JDK11 and use-jdk11 is deprecated.
|
||||
-->
|
||||
<property name="java.default" value="1.8" />
|
||||
<property name="java.supported" value="1.8,11,17" />
|
||||
<property name="java.default" value="11" />
|
||||
<property name="java.supported" value="11,17" />
|
||||
|
||||
<!-- directory details -->
|
||||
<property name="basedir" value="."/>
|
||||
|
|
@ -190,14 +190,6 @@
|
|||
<isset property="arch_x86" />
|
||||
</condition>
|
||||
|
||||
<resources id="_jvm8_arg_items">
|
||||
<!-- add necessary args in <string> tags; see _jvm11_arg_items as an example -->
|
||||
</resources>
|
||||
<pathconvert property="_jvm8_args_concat" refid="_jvm8_arg_items" pathsep=" "/>
|
||||
<condition property="java-jvmargs" value="${_jvm8_args_concat}">
|
||||
<equals arg1="${ant.java.version}" arg2="1.8"/>
|
||||
</condition>
|
||||
|
||||
<resources id="_jvm11_arg_items">
|
||||
<string>-Djdk.attach.allowAttachSelf=true</string>
|
||||
<string>-XX:+UseConcMarkSweepGC</string>
|
||||
|
|
@ -295,15 +287,6 @@
|
|||
In java 11 we also need to set a system property to enable netty to use Unsafe direct byte
|
||||
buffer construction (see CASSANDRA-16493)
|
||||
-->
|
||||
<!-- Leaving _jvm8_test_arg_items for now as we are not dropping Java 8 yet but it will be useless after CASSANDRA-18258-->
|
||||
<resources id="_jvm8_test_arg_items">
|
||||
<!-- TODO see CASSANDRA-16212 - we seem to OOM non stop now after CASSANDRA-16212, so to have clean CI while this gets looked into, disabling limiting metaspace
|
||||
<string>-XX:MaxMetaspaceExpansion=64M</string>
|
||||
<string>-XX:MaxMetaspaceSize=512M</string>
|
||||
<string>-XX:MetaspaceSize=128M</string>
|
||||
-->
|
||||
</resources>
|
||||
<pathconvert property="_jvm8_test_arg_items_concat" refid="_jvm8_test_arg_items" pathsep=" "/>
|
||||
<resources id="_jvm11_test_arg_items">
|
||||
<string>-XX:-CMSClassUnloadingEnabled</string>
|
||||
<string>-Dio.netty.tryReflectionSetAccessible=true</string>
|
||||
|
|
@ -313,9 +296,6 @@
|
|||
<string>-Dio.netty.tryReflectionSetAccessible=true</string>
|
||||
</resources>
|
||||
<pathconvert property="_jvm17_test_arg_items_concat" refid="_jvm17_test_arg_items" pathsep=" "/>
|
||||
<condition property="_std-test-jvmargs" value="${_jvm8_test_arg_items_concat}">
|
||||
<equals arg1="${ant.java.version}" arg2="1.8"/>
|
||||
</condition>
|
||||
<condition property="_std-test-jvmargs" value="${_jvm11_test_arg_items_concat}">
|
||||
<equals arg1="${ant.java.version}" arg2="11"/>
|
||||
</condition>
|
||||
|
|
@ -325,19 +305,7 @@
|
|||
|
||||
<!-- needed to compile org.apache.cassandra.utils.JMXServerUtils -->
|
||||
<!-- needed to compile org.apache.cassandra.distributed.impl.Instance-->
|
||||
<condition property="jdk11plus-javac-exports" value="--add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED --add-exports java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED" else="">
|
||||
<not>
|
||||
<equals arg1="${ant.java.version}" arg2="1.8"/>
|
||||
</not>
|
||||
</condition>
|
||||
<condition property="jdk11plus-javadoc-exports" value="${jdk11plus-javac-exports} --frames" else="">
|
||||
<not>
|
||||
<equals arg1="${ant.java.version}" arg2="1.8"/>
|
||||
</not>
|
||||
</condition>
|
||||
<condition property="checkstyle.version" value="8.45.1" else="10.8.1">
|
||||
<equals arg1="${ant.java.version}" arg2="1.8"/>
|
||||
</condition>
|
||||
<property name="jdk11plus-javac-exports" value="--add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED --add-exports java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED" />
|
||||
|
||||
<!--
|
||||
Add all the dependencies.
|
||||
|
|
@ -367,7 +335,7 @@
|
|||
windowtitle="${ant.project.name} API" classpathref="cassandra.classpath"
|
||||
bottom="Copyright &copy; 2009- The Apache Software Foundation"
|
||||
useexternalfile="yes" encoding="UTF-8" failonerror="false"
|
||||
maxmemory="256m" additionalparam="${jdk11plus-javadoc-exports}">
|
||||
maxmemory="256m" additionalparam="--frames">
|
||||
<filesets/>
|
||||
</javadoc>
|
||||
<fail message="javadoc failed">
|
||||
|
|
@ -551,7 +519,6 @@
|
|||
<antcall target="rat-check" inheritrefs="true"/>
|
||||
<antcall target="checkstyle" inheritrefs="true"/>
|
||||
<antcall target="checkstyle-test" inheritrefs="true"/>
|
||||
<antcall target="eclipse-warnings" inheritrefs="true"/>
|
||||
</target>
|
||||
|
||||
<!-- Stress build file -->
|
||||
|
|
@ -1894,10 +1861,10 @@
|
|||
</java>
|
||||
</target>
|
||||
|
||||
<target name="_maybe_update_idea_to_java11plus" depends="init" unless="java.version.8">
|
||||
<replace file="${eclipse.project.name}.iml" token="JDK_1_8" value="JDK_${ant.java.version}"/>
|
||||
<replace file=".idea/misc.xml" token="JDK_1_8" value="JDK_${ant.java.version}"/>
|
||||
<replace file=".idea/misc.xml" token="1.8" value="${ant.java.version}"/>
|
||||
<target name="_maybe_update_idea_to_java11plus" depends="init">
|
||||
<replace file="${eclipse.project.name}.iml" token="JDK_11" value="JDK_${ant.java.version}"/>
|
||||
<replace file=".idea/misc.xml" token="JDK_11" value="JDK_${ant.java.version}"/>
|
||||
<replace file=".idea/misc.xml" token="11" value="${ant.java.version}"/>
|
||||
<replaceregexp file=".idea/workspace.xml"
|
||||
match="name="VM_PARAMETERS" value="(.*)"
|
||||
replace="name="VM_PARAMETERS" value="\1 ${java-jvmargs} ${_std-test-jvmargs}"
|
||||
|
|
@ -2023,38 +1990,6 @@
|
|||
<delete dir="build/eclipse-classes" />
|
||||
</target>
|
||||
|
||||
<!-- ECJ 4.6.1 in standalone mode does not work with JPMS, so we skip this target for Java 11 -->
|
||||
<target name="eclipse-warnings" depends="build" description="Run eclipse compiler code analysis" if="java.version.8">
|
||||
<property name="ecj.log.dir" value="${build.dir}/ecj" />
|
||||
<property name="ecj.warnings.file" value="${ecj.log.dir}/eclipse_compiler_checks.txt"/>
|
||||
<mkdir dir="${ecj.log.dir}" />
|
||||
|
||||
<property name="ecj.properties" value="${basedir}/eclipse_compiler.properties" />
|
||||
|
||||
<echo message="Running Eclipse Code Analysis. Output logged to ${ecj.warnings.file}" />
|
||||
|
||||
<java
|
||||
jar="${build.dir.lib}/jars/ecj-${ecj.version}.jar"
|
||||
fork="true"
|
||||
failonerror="true"
|
||||
maxmemory="512m">
|
||||
<arg value="-source"/>
|
||||
<arg value="${java.default}" />
|
||||
<arg value="-target"/>
|
||||
<arg value="${ant.java.version}" />
|
||||
<arg value="-d" />
|
||||
<arg value="none" />
|
||||
<arg value="-proc:none" />
|
||||
<arg value="-log" />
|
||||
<arg value="${ecj.warnings.file}" />
|
||||
<arg value="-properties" />
|
||||
<arg value="${ecj.properties}" />
|
||||
<arg value="-cp" />
|
||||
<arg value="${toString:cassandra.classpath}" />
|
||||
<arg value="${build.src.java}" />
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<!-- Installs artifacts to local Maven repository -->
|
||||
<target name="mvn-install"
|
||||
depends="jar,sources-jar,javadoc-jar"
|
||||
|
|
|
|||
|
|
@ -92,23 +92,13 @@ if [ "x$CASSANDRA_LOG_DIR" = "x" ] ; then
|
|||
fi
|
||||
|
||||
#GC log path has to be defined here because it needs to access CASSANDRA_HOME
|
||||
if [ $JAVA_VERSION -ge 11 ] || [ $JAVA_VERSION -ge 17 ] ; then
|
||||
# See description of https://bugs.openjdk.java.net/browse/JDK-8046148 for details about the syntax
|
||||
# The following is the equivalent to -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M
|
||||
echo "$JVM_OPTS" | grep -qe "-[X]log:gc"
|
||||
if [ "$?" = "1" ] ; then # [X] to prevent ccm from replacing this line
|
||||
# only add -Xlog:gc if it's not mentioned in jvm-server.options file
|
||||
mkdir -p ${CASSANDRA_LOG_DIR}
|
||||
JVM_OPTS="$JVM_OPTS -Xlog:gc=info,heap*=trace,age*=debug,safepoint=info,promotion*=trace:file=${CASSANDRA_LOG_DIR}/gc.log:time,uptime,pid,tid,level:filecount=10,filesize=10485760"
|
||||
fi
|
||||
else
|
||||
# Java 8
|
||||
echo "$JVM_OPTS" | grep -qe "-[X]loggc"
|
||||
if [ "$?" = "1" ] ; then # [X] to prevent ccm from replacing this line
|
||||
# only add -Xlog:gc if it's not mentioned in jvm-server.options file
|
||||
mkdir -p ${CASSANDRA_LOG_DIR}
|
||||
JVM_OPTS="$JVM_OPTS -Xloggc:${CASSANDRA_LOG_DIR}/gc.log"
|
||||
fi
|
||||
# See description of https://bugs.openjdk.java.net/browse/JDK-8046148 for details about the syntax
|
||||
# The following is the equivalent to -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M
|
||||
echo "$JVM_OPTS" | grep -qe "-[X]log:gc"
|
||||
if [ "$?" = "1" ] ; then # [X] to prevent ccm from replacing this line
|
||||
# only add -Xlog:gc if it's not mentioned in jvm-server.options file
|
||||
mkdir -p ${CASSANDRA_LOG_DIR}
|
||||
JVM_OPTS="$JVM_OPTS -Xlog:gc=info,heap*=trace,age*=debug,safepoint=info,promotion*=trace:file=${CASSANDRA_LOG_DIR}/gc.log:time,uptime,pid,tid,level:filecount=10,filesize=10485760"
|
||||
fi
|
||||
|
||||
# Check what parameters were defined on jvm-server.options file to avoid conflicts
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
###########################################################################
|
||||
# jvm-clients.options #
|
||||
# #
|
||||
# See jvm8-clients.options and jvm11-clients.options for Java version #
|
||||
# See jvm11-clients.options and jvm17-clients.options for Java version #
|
||||
# specific options. #
|
||||
###########################################################################
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
# - only static flags are accepted (no variables or parameters) #
|
||||
# - dynamic flags will be appended to these on cassandra-env #
|
||||
# #
|
||||
# See jvm8-server.options and jvm11-server.options for Java version #
|
||||
# See jvm11-server.options and jvm17-server.options for Java version #
|
||||
# specific options. #
|
||||
###########################################################################
|
||||
|
||||
|
|
@ -125,7 +125,6 @@
|
|||
### Debug options
|
||||
|
||||
# uncomment to enable flight recorder
|
||||
#-XX:+UnlockCommercialFeatures
|
||||
#-XX:+FlightRecorder
|
||||
|
||||
# uncomment to have Cassandra JVM listen for remote debuggers/profilers on port 1414
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
-->
|
||||
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="false">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/.idea/out/main" />
|
||||
<output-test url="file://$MODULE_DIR$/.idea/out/test" />
|
||||
<exclude-output />
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="false" project-jdk-name="11" project-jdk-type="JavaSDK" />
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -210,19 +210,19 @@
|
|||
<package-root>${project.dir}/src/java</package-root>
|
||||
<classpath mode="compile">${cassandra.classpath.jars}</classpath>
|
||||
<built-to>${project.dir}/build/classes/main</built-to>
|
||||
<source-level>1.8</source-level>
|
||||
<source-level>11</source-level>
|
||||
</compilation-unit>
|
||||
<compilation-unit>
|
||||
<package-root>${project.dir}/tools/fqltool/src</package-root>
|
||||
<classpath mode="compile">${cassandra.classpath.jars}:${project.dir}/build/classes/main</classpath>
|
||||
<built-to>${project.dir}/build/classes/fqltool</built-to>
|
||||
<source-level>1.8</source-level>
|
||||
<source-level>11</source-level>
|
||||
</compilation-unit>
|
||||
<compilation-unit>
|
||||
<package-root>${project.dir}/tools/stress/src</package-root>
|
||||
<classpath mode="compile">${cassandra.classpath.jars}:${project.dir}/build/classes/main</classpath>
|
||||
<built-to>${project.dir}/build/classes/stress</built-to>
|
||||
<source-level>1.8</source-level>
|
||||
<source-level>11</source-level>
|
||||
</compilation-unit>
|
||||
<compilation-unit>
|
||||
<package-root>${project.dir}/test/unit</package-root>
|
||||
|
|
@ -233,21 +233,21 @@
|
|||
<unit-tests/>
|
||||
<classpath mode="compile">${cassandra.classpath.jars}:${project.dir}/build/classes/main:${project.dir}/build/classes/fqltool/:${project.dir}/build/classes/stress/</classpath>
|
||||
<built-to>${project.dir}/build/test/classes</built-to>
|
||||
<source-level>1.8</source-level>
|
||||
<source-level>11</source-level>
|
||||
</compilation-unit>
|
||||
<compilation-unit>
|
||||
<package-root>${project.dir}/tools/fqltool/test/unit</package-root>
|
||||
<unit-tests/>
|
||||
<classpath mode="compile">${cassandra.classpath.jars}:${project.dir}/build/classes/main:${project.dir}/build/classes/fqltool/</classpath>
|
||||
<built-to>${project.dir}/build/test/fqltool-classes</built-to>
|
||||
<source-level>1.8</source-level>
|
||||
<source-level>11</source-level>
|
||||
</compilation-unit>
|
||||
<compilation-unit>
|
||||
<package-root>${project.dir}/tools/stress/test/unit</package-root>
|
||||
<unit-tests/>
|
||||
<classpath mode="compile">${cassandra.classpath.jars}:${project.dir}/build/classes/main:${project.dir}/build/classes/stress/</classpath>
|
||||
<built-to>${project.dir}/build/test/stress-classes</built-to>
|
||||
<source-level>1.8</source-level>
|
||||
<source-level>11</source-level>
|
||||
</compilation-unit>
|
||||
</java-data>
|
||||
</configuration>
|
||||
|
|
|
|||
|
|
@ -83,21 +83,7 @@ JVM_VERSION=${jvmver%_*}
|
|||
short=$(echo "${jvmver}" | cut -c1-2)
|
||||
|
||||
JAVA_VERSION=17
|
||||
if [ "$JVM_VERSION" = "1.8.0" ] ; then
|
||||
JVM_PATCH_VERSION=${jvmver#*_}
|
||||
if [ "$JVM_VERSION" \< "1.8" ] || [ "$JVM_VERSION" \> "1.8.2" ] ; then
|
||||
echo "Cassandra 4.0 requires either Java 8 (update 151 or newer) or Java 11 (or newer). Java $JVM_VERSION is not supported."
|
||||
exit 1;
|
||||
fi
|
||||
if [ "$JVM_PATCH_VERSION" -lt 151 ] ; then
|
||||
echo "Cassandra 4.0 requires either Java 8 (update 151 or newer) or Java 11 (or newer). Java 8 update $JVM_PATCH_VERSION is not supported."
|
||||
exit 1;
|
||||
fi
|
||||
JAVA_VERSION=8
|
||||
elif [ "$JVM_VERSION" \< "11" ] ; then
|
||||
echo "Cassandra 4.0 requires either Java 8 (update 151 or newer) or Java 11 (or newer)."
|
||||
exit 1;
|
||||
elif [ "$short" = "11" ] ; then
|
||||
if [ "$short" = "11" ] ; then
|
||||
JAVA_VERSION=11
|
||||
elif [ "$JVM_VERSION" \< "17" ] ; then
|
||||
echo "Cassandra 5.0 requires Java 11 or Java 17(or newer)."
|
||||
|
|
@ -128,8 +114,6 @@ if [ $JAVA_VERSION -ge 17 ] ; then
|
|||
JVM_DEP_OPTS_FILE=$CASSANDRA_CONF/jvm17${jvmoptions_variant:--clients}.options
|
||||
elif [ $JAVA_VERSION -ge 11 ] ; then
|
||||
JVM_DEP_OPTS_FILE=$CASSANDRA_CONF/jvm11${jvmoptions_variant:--clients}.options
|
||||
else
|
||||
JVM_DEP_OPTS_FILE=$CASSANDRA_CONF/jvm8${jvmoptions_variant:--clients}.options
|
||||
fi
|
||||
|
||||
for opt in `grep "^-" $JVM_OPTS_FILE` `grep "^-" $JVM_DEP_OPTS_FILE`
|
||||
|
|
|
|||
Loading…
Reference in New Issue