Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions scripts/setup-scenarios-prerequisites.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ info() { printf "${BLUE}ℹ${NC} %s\n" "$1"; }
# ── Constants ────────────────────────────────────────────────
FOUNDRY_VERSION="v1.6.0-rc1"
PYENV_VERSION="v2.5.3"
CASSANDRA_VERSION="5.0.6"
CASSANDRA_VERSION="5.0.7"
CASSANDRA_SHA256="556be693f1941aeb8ec1538fe6224cbefdca7bc3729f87ff0e24a0052eb98c33"
PYTHON_VERSION="3.11.10"
PYENV_ROOT="${PYENV_ROOT:-$HOME/.pyenv}"
PYTHON_BIN="${PYENV_ROOT}/versions/${PYTHON_VERSION}/bin/python3"
CASSANDRA_URL="https://dlcdn.apache.org/cassandra/${CASSANDRA_VERSION}/apache-cassandra-${CASSANDRA_VERSION}-bin.tar.gz"
CASSANDRA_URL="https://archive.apache.org/dist/cassandra/${CASSANDRA_VERSION}/apache-cassandra-${CASSANDRA_VERSION}-bin.tar.gz"
Comment on lines +30 to +35
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CASSANDRA_VERSION was bumped here to 5.0.7, but scenarios/test_caching_subsystem.py still hardcodes CASSANDRA_VERSION = "5.0.6" when constructing CASSANDRA_HOME, so it will fail to find cqlsh after this script installs 5.0.7. Update the scenario to match (or better, derive the version from a single source) so CI/dev runs stay consistent.

Copilot uses AI. Check for mistakes.
CASSANDRA_DIR="$HOME/.foc-devnet/artifacts/cassandra"
FOUNDRY_DIR="$HOME/.foc-devnet/artifacts/foundry/bin"
CASSANDRA_HOME="${CASSANDRA_DIR}/apache-cassandra-${CASSANDRA_VERSION}"
Expand Down Expand Up @@ -134,6 +135,7 @@ else
mkdir -p "$CASSANDRA_DIR"
TARBALL="${CASSANDRA_DIR}/apache-cassandra-${CASSANDRA_VERSION}-bin.tar.gz"
curl -fL -o "$TARBALL" "$CASSANDRA_URL"
verify_checksum "$TARBALL" "$CASSANDRA_SHA256"
tar -xzf "$TARBALL" -C "$CASSANDRA_DIR"
Comment on lines 136 to 139
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new checksum verification relies on sha256sum, but this script doesn’t check that the command exists (and it’s not available by default on some platforms like macOS). Consider validating the tool up front and/or using a portable fallback (e.g., shasum -a 256 or openssl dgst -sha256) so the script fails with a clear message instead of a generic command-not-found error.

Copilot uses AI. Check for mistakes.
if [[ -x "$CQLSH" ]]; then
CQLSH_VERSION="$(CQLSH_PYTHON="$CUSTOM_PYTHON" "$CQLSH" --version 2>&1 || true)"
Expand Down
Loading