Skip to content

Commit 2025655

Browse files
committed
use get_rw_versions in ci
1 parent 67ab75b commit 2025655

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

backwards-compat-tests/scripts/run_local.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ setup_new_cluster() {
5757

5858
main() {
5959
set -euo pipefail
60-
get_rw_version_tag
60+
get_rw_versions
6161
setup_old_cluster
6262
configure_rw
6363
seed_old_cluster "$OLD_VERSION"

backwards-compat-tests/scripts/utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ seed_json_kafka() {
121121
################################### Entry Points
122122

123123
# Get $OLD_VERSION and $NEW_VERSION for Risingwave
124-
get_rw_version_tag() {
124+
get_rw_versions() {
125125
# For backwards compat test we assume we are testing the latest version of RW (i.e. latest main commit)
126126
# against the Nth latest release candidate, where N > 1. N can be larger,
127127
local VERSION_OFFSET=4

ci/scripts/backwards-compat-test.sh

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ source backwards-compat-tests/scripts/utils.sh
3838

3939
################################### Main
4040

41-
OLD_TAG=1.0.0
42-
NEW_TAG=1.1.0
43-
4441
configure_rw() {
4542
echo "--- Setting up cluster config"
4643
cat <<EOF > risedev-profiles.user.yml
@@ -77,25 +74,25 @@ EOF
7774
}
7875

7976
setup_old_cluster() {
80-
echo "--- Build risedev for $OLD_TAG, it may not be backwards compatible"
77+
echo "--- Build risedev for $OLD_VERSION, it may not be backwards compatible"
8178
git config --global --add safe.directory /risingwave
82-
git checkout "v${OLD_TAG}-rc"
79+
git checkout "v${OLD_VERSION}-rc"
8380
cargo build -p risedev
84-
OLD_URL=https://github.com/risingwavelabs/risingwave/releases/download/v${OLD_TAG}/risingwave-v${OLD_TAG}-x86_64-unknown-linux.tar.gz
81+
OLD_URL=https://github.com/risingwavelabs/risingwave/releases/download/v${OLD_VERSION}/risingwave-v${OLD_VERSION}-x86_64-unknown-linux.tar.gz
8582
wget $OLD_URL
86-
tar -xvf risingwave-v${OLD_TAG}-x86_64-unknown-linux.tar.gz
83+
tar -xvf risingwave-v${OLD_VERSION}-x86_64-unknown-linux.tar.gz
8784
mv risingwave target/debug/risingwave
8885

89-
# echo "--- Setup old release $OLD_TAG"
86+
# echo "--- Setup old release $OLD_VERSION"
9087
# pushd ..
91-
# git clone --depth 1 --branch "v${OLD_TAG}-rc" "https://github.com/risingwavelabs/risingwave.git"
88+
# git clone --depth 1 --branch "v${OLD_VERSION}-rc" "https://github.com/risingwavelabs/risingwave.git"
9289
# pushd risingwave
9390
# mkdir -p target/debug
9491
# echo "Branch:"
9592
# git branch
9693
# cp risingwave target/debug/risingwave
9794

98-
echo "--- Start cluster on tag $OLD_TAG"
95+
echo "--- Start cluster on tag $OLD_VERSION"
9996
git config --global --add safe.directory /risingwave
10097
}
10198

@@ -108,13 +105,15 @@ setup_new_cluster() {
108105
}
109106

110107
main() {
108+
set -euo pipefail
109+
get_rw_versions
111110
setup_old_cluster
112111
configure_rw
113-
seed_old_cluster $OLD_TAG
112+
seed_old_cluster "$OLD_VERSION"
114113

115114
setup_new_cluster
116115
configure_rw
117-
validate_new_cluster $NEW_TAG
116+
validate_new_cluster "$NEW_VERSION"
118117
}
119118

120119
main

0 commit comments

Comments
 (0)