From 7aff785d52f198c53ad139a4e3605933f12b38c1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 14 Sep 2024 07:06:53 +0000 Subject: [PATCH] fix(ci): fix cassandra ci (#18536) (#18537) Co-authored-by: Xinhao Xu <84456268+xxhZs@users.noreply.github.com> --- ci/scripts/e2e-cassandra-sink-test.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ci/scripts/e2e-cassandra-sink-test.sh b/ci/scripts/e2e-cassandra-sink-test.sh index b222e4a944967..678b97aac4b54 100755 --- a/ci/scripts/e2e-cassandra-sink-test.sh +++ b/ci/scripts/e2e-cassandra-sink-test.sh @@ -41,18 +41,24 @@ wget $(get_latest_cassandra_download_url) -O cassandra_latest.tar.gz tar xfvz cassandra_latest.tar.gz export LATEST_CASSANDRA_VERSION=$(get_latest_cassandra_version) export CASSANDRA_DIR="./apache-cassandra-${LATEST_CASSANDRA_VERSION}" -# remove bundled packages, and use installed packages, because Python 3.12 has removed asyncore, but I failed to install libev support for bundled Python driver. -rm ${CASSANDRA_DIR}/lib/futures-2.1.6-py2.py3-none-any.zip -rm ${CASSANDRA_DIR}/lib/cassandra-driver-internal-only-3.29.0.zip -apt-get install -y libev4 libev-dev -pip3 install --break-system-packages cassandra-driver +# Cassandra only support python 3.11 +apt-get install -y software-properties-common +add-apt-repository ppa:deadsnakes/ppa +apt-get update +apt-get install -y python3.11 +apt-get install -y python3.11-venv +python3.11 -m venv cqlsh_env +source cqlsh_env/bin/activate + export CQLSH_HOST=cassandra-server export CQLSH_PORT=9042 echo "--- testing sinks" sqllogictest -p 4566 -d dev './e2e_test/sink/cassandra_sink.slt' +deactivate + echo "--- Kill cluster" cd ../../ risedev ci-kill \ No newline at end of file