From 89fe2223b4e1118dbd11cfd00f2a7b7d12940502 Mon Sep 17 00:00:00 2001 From: Mick Semb Wever Date: Sun, 6 Aug 2023 00:13:43 +0300 Subject: [PATCH] Update trunk to version 5.1 - update jvm-dtest supported upgrade paths - update circeci and in-tree scripts to build 5.0 dtest jar - update in-tree scripts for better repetitive testing of jvm-dtest-upgrade tests - fix jvm-dtest-upgrade tests that broke with 5.0 -> 5.1 upgrades - update docs trunk -> 5.0 patch by Mick Semb Wever; reviewed by Brandon Williams for CASSANDRA-18705 --- .build/run-tests.sh | 25 +++++++++++++++++++------ .circleci/config.yml | 2 +- .circleci/config.yml.FREE | 2 +- .circleci/config.yml.PAID | 2 +- .circleci/config_template.yml | 2 +- CHANGES.txt | 2 +- build.xml | 2 +- doc/antora.yml | 4 ++-- 8 files changed, 27 insertions(+), 14 deletions(-) diff --git a/.build/run-tests.sh b/.build/run-tests.sh index fd6a7da21d..4a0cecfa33 100755 --- a/.build/run-tests.sh +++ b/.build/run-tests.sh @@ -74,16 +74,30 @@ _timeout_for() { } _build_all_dtest_jars() { - pushd $TMP_DIR >/dev/null - rm -fR ${TMP_DIR}/cassandra-dtest-jars - until git clone --quiet --depth 1 --no-single-branch https://github.com/apache/cassandra.git cassandra-dtest-jars ; do echo "git clone failed… trying again… " ; done + # build the dtest-jar for the branch under test. remember to `ant clean` if you want a new dtest jar built + dtest_jar_version=$(grep 'property\s*name=\"base.version\"' build.xml |sed -ne 's/.*value=\"\([^"]*\)\".*/\1/p') + if [ -f "${DIST_DIR}/dtest-${dtest_jar_version}.jar" ] ; then + echo "Skipping dtest jar build for branch under test as ${DIST_DIR}/dtest-${dtest_jar_version}.jar already exists" + else + ant jar dtest-jar ${ANT_TEST_OPTS} -Dbuild.dir=${TMP_DIR}/cassandra-dtest-jars/build + cp "${TMP_DIR}/cassandra-dtest-jars/build/dtest-${dtest_jar_version}.jar" ${DIST_DIR}/ + fi + + if [ -d ${TMP_DIR}/cassandra-dtest-jars ] && [ "https://github.com/apache/cassandra.git" == "$(git -C ${TMP_DIR}/cassandra-dtest-jars remote get-url origin)" ] ; then + until git -C ${TMP_DIR}/cassandra-dtest-jars fetch --quiet origin ; do echo "git pull failed… trying again… " ; done + else + rm -fR ${TMP_DIR}/cassandra-dtest-jars + pushd $TMP_DIR >/dev/null + until git clone --quiet --depth 1 --no-single-branch https://github.com/apache/cassandra.git cassandra-dtest-jars ; do echo "git clone failed… trying again… " ; done + popd >/dev/null + fi # cassandra-4 branches need CASSANDRA_USE_JDK11 to allow jdk11 [ "${java_version}" -eq 11 ] && export CASSANDRA_USE_JDK11=true pushd ${TMP_DIR}/cassandra-dtest-jars >/dev/null - for branch in cassandra-4.0 cassandra-4.1 trunk ; do - git checkout $branch + for branch in cassandra-4.0 cassandra-4.1 cassandra-5.0 ; do + git checkout --quiet $branch dtest_jar_version=$(grep 'property\s*name=\"base.version\"' build.xml |sed -ne 's/.*value=\"\([^"]*\)\".*/\1/p') if [ -f "${DIST_DIR}/dtest-${dtest_jar_version}.jar" ] ; then echo "Skipping dtest jar build for branch ${branch} as ${DIST_DIR}/dtest-${dtest_jar_version}.jar already exists" @@ -95,7 +109,6 @@ _build_all_dtest_jars() { cp "${TMP_DIR}/cassandra-dtest-jars/build/dtest-${dtest_jar_version}.jar" ${DIST_DIR}/ done popd >/dev/null - popd >/dev/null ls -l ${DIST_DIR}/dtest*.jar unset CASSANDRA_USE_JDK11 } diff --git a/.circleci/config.yml b/.circleci/config.yml index 0c247fbc85..2b3e22fa07 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5070,7 +5070,7 @@ jobs: cd ~/cassandra mkdir ~/dtest_jars git remote add apache https://github.com/apache/cassandra.git - for branch in cassandra-4.0 cassandra-4.1 trunk; do + for branch in cassandra-4.0 cassandra-4.1 cassandra-5.0 ; do # check out the correct cassandra version: git remote set-branches --add apache '$branch' git fetch --depth 1 apache $branch diff --git a/.circleci/config.yml.FREE b/.circleci/config.yml.FREE index 0c247fbc85..2b3e22fa07 100644 --- a/.circleci/config.yml.FREE +++ b/.circleci/config.yml.FREE @@ -5070,7 +5070,7 @@ jobs: cd ~/cassandra mkdir ~/dtest_jars git remote add apache https://github.com/apache/cassandra.git - for branch in cassandra-4.0 cassandra-4.1 trunk; do + for branch in cassandra-4.0 cassandra-4.1 cassandra-5.0 ; do # check out the correct cassandra version: git remote set-branches --add apache '$branch' git fetch --depth 1 apache $branch diff --git a/.circleci/config.yml.PAID b/.circleci/config.yml.PAID index 8e8e89c95c..f1140ae605 100644 --- a/.circleci/config.yml.PAID +++ b/.circleci/config.yml.PAID @@ -5070,7 +5070,7 @@ jobs: cd ~/cassandra mkdir ~/dtest_jars git remote add apache https://github.com/apache/cassandra.git - for branch in cassandra-4.0 cassandra-4.1 trunk; do + for branch in cassandra-4.0 cassandra-4.1 cassandra-5.0 ; do # check out the correct cassandra version: git remote set-branches --add apache '$branch' git fetch --depth 1 apache $branch diff --git a/.circleci/config_template.yml b/.circleci/config_template.yml index b8ed8cbbcb..b4e638b3d4 100644 --- a/.circleci/config_template.yml +++ b/.circleci/config_template.yml @@ -2901,7 +2901,7 @@ commands: cd ~/cassandra mkdir ~/dtest_jars git remote add apache https://github.com/apache/cassandra.git - for branch in cassandra-4.0 cassandra-4.1 trunk; do + for branch in cassandra-4.0 cassandra-4.1 cassandra-5.0 ; do # check out the correct cassandra version: git remote set-branches --add apache '$branch' git fetch --depth 1 apache $branch diff --git a/CHANGES.txt b/CHANGES.txt index 984b9ef99d..80bd1e46ea 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,4 @@ -5.0 +5.0-alpha1 * Prevent InaccessibleObjectException when the Leak Detector is traversing objects (CASSANDRA-18708) * Remove legacy command line options from cassandra-stress (CASSANDRA-18529) * Remove commitlog_sync_batch_window_in_ms (CASSANDRA-17161) diff --git a/build.xml b/build.xml index 7c7efc0a5d..243667d451 100644 --- a/build.xml +++ b/build.xml @@ -32,7 +32,7 @@ - + diff --git a/doc/antora.yml b/doc/antora.yml index 401cbd43a9..42f01753e1 100644 --- a/doc/antora.yml +++ b/doc/antora.yml @@ -1,6 +1,6 @@ name: Cassandra -version: 'trunk' -display_version: 'trunk' +version: '5.0' +display_version: '5.0' prerelease: true asciidoc: attributes: