Skip to content

Commit

Permalink
chore(ci): use release branch rather than release candidate branch fo…
Browse files Browse the repository at this point in the history
…r backwards compat tests (#13247)
  • Loading branch information
kwannoel authored Nov 3, 2023
1 parent 5a02631 commit 4c4734c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion backwards-compat-tests/scripts/run_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ EOF
setup_old_cluster() {
echo "--- Setting up old cluster"
LATEST_BRANCH=$(git branch --show-current)
git checkout "v${OLD_VERSION}-rc"
git checkout "v${OLD_VERSION}"
}

setup_new_cluster() {
Expand Down
7 changes: 4 additions & 3 deletions backwards-compat-tests/scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,14 @@ get_rw_versions() {
echo "--- git branch origin output"
git branch -r | grep origin

# Extract X.Y.Z tags
echo "--- VERSION BRANCHES"
local branches=$(git branch -r | grep -E "^ origin\/v[0-9]*\.[0-9]*.*-rc" | tr -d ' ' | sed -E 's/origin\/v([0-9]*\.[0-9])\-rc/\1.0/' | tr -d '\-vrcorigin\/' | tr -d ' ')
echo "$branches"
local tags=$(git tag | grep -E "^v[0-9]+\.[0-9]+\.[0-9]+$" | tr -d 'v' | tr -d ' ')
echo "$tags"

# Then we sort them in descending order.
echo "--- VERSIONS"
local sorted_versions=$(echo -e "$branches" | sort -t '.' -n)
local sorted_versions=$(echo -e "$tags" | sort -t '.' -n)
echo "$sorted_versions"

# Then we take the Nth latest version.
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/backwards-compat-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ EOF
setup_old_cluster() {
echo "--- Build risedev for $OLD_VERSION, it may not be backwards compatible"
git config --global --add safe.directory /risingwave
git checkout "v${OLD_VERSION}-rc"
git checkout "v${OLD_VERSION}"
cargo build -p risedev
OLD_URL=https://github.com/risingwavelabs/risingwave/releases/download/v${OLD_VERSION}/risingwave-v${OLD_VERSION}-x86_64-unknown-linux.tar.gz
wget $OLD_URL
Expand Down

0 comments on commit 4c4734c

Please sign in to comment.