Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
fb54012
ci: replace version helper with get-version action
dkropachev May 24, 2026
b3d8395
ci: strip cassandra version prefix
dkropachev May 24, 2026
50bb4c5
ci: rename scylla integration checks
dkropachev May 24, 2026
87952c2
ci: restore ccm path for integration jobs
dkropachev May 24, 2026
fafda42
ci: make ccm path explicit in integration jobs
dkropachev May 24, 2026
cd44dee
ci: export ccm path in integration jobs
dkropachev May 24, 2026
b230999
ci: add scylla lts integration jobs
dkropachev May 24, 2026
0014a9d
ci: fix scylla release line filters
dkropachev May 24, 2026
7a3a82c
ci: fix integration workflow env handling
dkropachev May 24, 2026
320f5a5
ci: export ccm path in make recipes
dkropachev May 24, 2026
991e947
ci: use explicit ccm path in make recipes
dkropachev May 24, 2026
656d2ad
ci: add local ccm shim
dkropachev May 24, 2026
476895e
ci: install ccm with python3 pip
dkropachev May 24, 2026
8370996
ci: expose ccm user site in shim
dkropachev May 24, 2026
e12fa38
ci: invoke installed ccm script from shim
dkropachev May 24, 2026
8a93355
ci: resolve ccm script from user base
dkropachev May 24, 2026
e15dd51
ci: prefer installed ccm on PATH
dkropachev May 24, 2026
9b53547
ci: run installed ccm script with python3
dkropachev May 24, 2026
38ef040
ci: resolve CCM from user bin
dkropachev May 24, 2026
514e8c3
ci: export CCM binary path
dkropachev May 24, 2026
d446395
ci: install CCM from git source
dkropachev May 24, 2026
48a134f
ci: use repo-local CCM shim
dkropachev May 24, 2026
914b64c
ci: install CCM from local checkout
dkropachev May 24, 2026
922bbe0
ci: run CCM from cloned source tree
dkropachev May 24, 2026
9e09036
ci: bump scylla driver and fix timeout test
dkropachev May 24, 2026
0b3cb13
packaging: raise smoke test connect timeout
dkropachev May 24, 2026
1e4f2fc
packaging: extend smoke test connect timeout
dkropachev May 24, 2026
6a11753
packaging: extend smoke test timeout further
dkropachev May 24, 2026
e7da74d
packaging: advertise localhost in smoke test compose
dkropachev May 24, 2026
49ebbb1
packaging: broadcast localhost in smoke test compose
dkropachev May 24, 2026
d7e9b64
packaging: drop smoke-test compose healthcheck
dkropachev May 24, 2026
b4f0cf4
packaging: bind smoke test scylla on all interfaces
dkropachev May 24, 2026
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
119 changes: 70 additions & 49 deletions .github/workflows/build-lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,64 +60,80 @@ jobs:

strategy:
matrix:
scylla-version: [ENTERPRISE-RELEASE, ENTERPRISE-PRIOR-RELEASE]
scylla-version: [LATEST, PRIOR, LTS-LATEST, LTS-PRIOR]
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python 3
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Update apt cache
run: sudo apt-get update -y

- name: Install CCM
run: |
make install-ccm-if-missing
PATH="$HOME/.local/bin:$PATH" make install-ccm-if-missing

- name: Select scylla filter
id: scylla-filter
run: |
# Select the latest stable patch on each release line and drop
# prerelease tags before taking the requested position.
case "${{ matrix.scylla-version }}" in
LATEST)
printf 'value=%s\n' '^[0-9]{4}$.^[2-9][0-9]*$.LAST and *.*.^[0-9]+$ and LAST' >> "$GITHUB_OUTPUT"
;;
PRIOR)
printf 'value=%s\n' '^[0-9]{4}$.^[2-9][0-9]*$.LAST and *.*.^[0-9]+$ and LAST-1' >> "$GITHUB_OUTPUT"
;;
LTS-LATEST)
printf 'value=%s\n' '^[0-9]{4}$.1.LAST and *.*.^[0-9]+$ and LAST' >> "$GITHUB_OUTPUT"
;;
LTS-PRIOR)
printf 'value=%s\n' '^[0-9]{4}$.1.LAST and *.*.^[0-9]+$ and LAST-1' >> "$GITHUB_OUTPUT"
;;
*)
echo "Unknown scylla version name ${{ matrix.scylla-version }}"
exit 1
;;
esac

- name: Get scylla version
id: scylla-version
uses: scylladb-actions/get-version@v0.4.5
with:
source: dockerhub-imagetag
repo: scylladb/scylla
filters: ${{ steps.scylla-filter.outputs.value }}

- name: Resolve scylla version
id: scylla-version-value
run: |
if [[ "${{ matrix.scylla-version }}" == "ENTERPRISE-RELEASE" ]]; then
echo "value=$(python3 ci/version_fetch.py --version-index 1 scylla-enterprise-stable:1 | tr -d '\"')" | tee -a $GITHUB_OUTPUT
elif [[ "${{ matrix.scylla-version }}" == "ENTERPRISE-PRIOR-RELEASE" ]]; then
echo "value=$(python3 ci/version_fetch.py --version-index 2 scylla-enterprise-stable:2 | tr -d '\"')" | tee -a $GITHUB_OUTPUT
elif [[ "${{ matrix.scylla-version }}" == "ENTERPRISE-RC" ]]; then
echo "value=$(python3 ci/version_fetch.py --version-index 1 scylla-enterprise-rc | tr -d '\"')" | tee -a $GITHUB_OUTPUT
elif [[ "${{ matrix.scylla-version }}" == "OSS-RELEASE" ]]; then
echo "value=$(python3 ci/version_fetch.py --version-index 1 scylla-oss-stable:1 | tr -d '\"')" | tee -a $GITHUB_OUTPUT
elif [[ "${{ matrix.scylla-version }}" == "OSS-PRIOR-RELEASE" ]]; then
echo "value=$(python3 ci/version_fetch.py --version-index 2 scylla-oss-stable:2 | tr -d '\"')" | tee -a $GITHUB_OUTPUT
elif [[ "${{ matrix.scylla-version }}" == "OSS-RC" ]]; then
echo "value=$(python3 ci/version_fetch.py --version-index 1 scylla-oss-rc | tr -d '\"')" | tee -a $GITHUB_OUTPUT
elif echo "${{ matrix.scylla-version }}" | grep -P '^[0-9\.]+'; then # If you want to run specific version do just that
echo "value=${{ matrix.scylla-version }}" | tee -a $GITHUB_OUTPUT
else
echo "Unknown scylla version name `${{ matrix.scylla-version }}`"
value='${{ fromJson(steps.scylla-version.outputs.versions)[0] }}'
if [ -z "$value" ]; then
echo "No Scylla version resolved for ${{ matrix.scylla-version }}" >&2
exit 1
fi
echo "value=$value" | tee -a "$GITHUB_OUTPUT"

- name: Pull CCM image from the cache
uses: actions/cache/restore@v4
id: pull-image
with:
path: ~/.ccm/scylla-repository
key: image-scylla-${{ runner.os }}-${{ steps.scylla-version.outputs.value }}
key: image-scylla-${{ runner.os }}-${{ steps.scylla-version-value.outputs.value }}

- name: Download Scylla (${{ steps.scylla-version.outputs.value }}) image
- name: Download Scylla (${{ steps.scylla-version-value.outputs.value }}) image
if: steps.pull-image.outputs.cache-hit != 'true'
run: SCYLLA_VERSION="release:${{ steps.scylla-version.outputs.value }}" make download-ccm-scylla-image
run: |
PATH="$HOME/.local/bin:$PATH" SCYLLA_VERSION="release:${{ steps.scylla-version-value.outputs.value }}" make download-ccm-scylla-image

- name: Save CCM image cache
uses: actions/cache/save@v4
if: steps.pull-image.outputs.cache-hit != 'true'
with:
path: ~/.ccm/scylla-repository
key: image-scylla-${{ runner.os }}-${{ steps.scylla-version.outputs.value }}
key: image-scylla-${{ runner.os }}-${{ steps.scylla-version-value.outputs.value }}

- name: Pull integration test binary
uses: actions/cache/restore@v4
Expand All @@ -134,9 +150,10 @@ jobs:
- name: Prepare environment
run: make update-rust-tooling prepare-integration-test

- name: Run integration tests on Scylla ${{ steps.scylla-version.outputs.value }}
- name: Run integration tests on Scylla ${{ steps.scylla-version-value.outputs.value }}
id: run-integration-tests
run: SCYLLA_VERSION="release:${{ steps.scylla-version.outputs.value }}" make run-test-integration-scylla
run: |
PATH="$HOME/.local/bin:$PATH" SCYLLA_VERSION="release:${{ steps.scylla-version-value.outputs.value }}" make run-test-integration-scylla

- name: Upload test logs
uses: actions/upload-artifact@v4
Expand All @@ -158,7 +175,7 @@ jobs:

strategy:
matrix:
cassandra-version: [RELEASE-3.X]
cassandra-version: [3-LATEST]
java-version: [8]
fail-fast: false

Expand All @@ -172,45 +189,48 @@ jobs:
java-version: ${{ matrix.java-version }}
distribution: "adopt"

- name: Setup Python 3
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Update apt cache
run: sudo apt-get update -y

- name: Install CCM
run: make install-ccm-if-missing
run: |
PATH="$HOME/.local/bin:$PATH" make install-ccm-if-missing

- name: Get cassandra version
id: cassandra-version
uses: scylladb-actions/get-version@v0.4.5
with:
source: github-tag
repo: apache/cassandra
prefix: cassandra-
out-no-prefix: true
github-token: ${{ secrets.GITHUB_TOKEN }}
filters: '^[0-9]+$.^[0-9]+$.^[0-9]+$ and 3.LAST.LAST'

- name: Resolve cassandra version
id: cassandra-version-value
run: |
if [[ "${{ matrix.cassandra-version }}" == "RELEASE-3.X" ]]; then
echo "value=$(python3 ci/version_fetch.py --version-index 1 cassandra3-stable:1 | tr -d '\"')" | tee -a $GITHUB_OUTPUT
elif [[ "${{ matrix.cassandra-version }}" == "RELEASE-4.X" ]]; then
echo "value=$(python3 ci/version_fetch.py --version-index 1 cassandra4-stable:1 | tr -d '\"')" | tee -a $GITHUB_OUTPUT
else
echo "Unknown cassandra version name `${{ matrix.cassandra-version }}`"
fi
value=${{ fromJson(steps.cassandra-version.outputs.versions)[0] }}
echo "value=${value#cassandra-}" | tee -a "$GITHUB_OUTPUT"

- name: Pull CCM image from the cache
uses: actions/cache/restore@v4
id: pull-image
with:
path: ~/.ccm/repository
key: image-cassandra-${{ runner.os }}-${{ steps.cassandra-version.outputs.value }}
key: image-cassandra-${{ runner.os }}-${{ steps.cassandra-version-value.outputs.value }}

- name: Download Cassandra (${{ steps.cassandra-version.outputs.value }}) image
- name: Download Cassandra (${{ steps.cassandra-version-value.outputs.value }}) image
if: steps.pull-image.outputs.cache-hit != 'true'
run: CASSANDRA_VERSION="${{ steps.cassandra-version.outputs.value }}" make download-ccm-cassandra-image
run: |
PATH="$HOME/.local/bin:$PATH" CASSANDRA_VERSION="${{ steps.cassandra-version-value.outputs.value }}" make download-ccm-cassandra-image

- name: Save CCM image cache
uses: actions/cache/save@v4
if: steps.pull-image.outputs.cache-hit != 'true'
with:
path: ~/.ccm/repository
key: image-cassandra-${{ runner.os }}-${{ steps.cassandra-version.outputs.value }}
key: image-cassandra-${{ runner.os }}-${{ steps.cassandra-version-value.outputs.value }}

- name: Pull integration test binary
uses: actions/cache/restore@v4
Expand All @@ -227,9 +247,10 @@ jobs:
- name: Prepare environment
run: make update-rust-tooling prepare-integration-test

- name: Run integration tests on Cassandra ${{ steps.cassandra-version.outputs.value }}
- name: Run integration tests on Cassandra ${{ steps.cassandra-version-value.outputs.value }}
id: run-integration-tests
run: CASSANDRA_VERSION="${{ steps.cassandra-version.outputs.value }}" make run-test-integration-cassandra
run: |
PATH="$HOME/.local/bin:$PATH" CASSANDRA_VERSION="${{ steps.cassandra-version-value.outputs.value }}" make run-test-integration-cassandra

- name: Upload test logs
uses: actions/upload-artifact@v4
Expand Down
28 changes: 23 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ SHELL := bash
ifeq ($(OS),Windows_NT)
SHELL := pwsh.exe
.SHELLFLAGS := -NoProfile -Command $$ErrorActionPreference = 'Stop';
else
# Prefer the repo-local CCM shim, which can execute the cloned upstream tree
# and still fall back to a user-installed console script when present.
export PATH := $(HOME)/.local/bin:$(CURDIR)/ci:$(PATH)
CCM_SOURCE_DIR ?= $(HOME)/.ccm/scylla-ccm
export CCM_SOURCE_DIR
CCM_BIN ?= $(CURDIR)/ci/ccm
export CCM_BIN
endif

UNAME_S := $(shell uname -s)
Expand Down Expand Up @@ -176,6 +184,10 @@ ifndef CCM_COMMIT_ID
export CCM_COMMIT_ID := master
endif

ifndef CCM_PIP_DEPENDENCIES
CCM_PIP_DEPENDENCIES := ruamel-yaml psutil requests packaging boto3 tqdm urllib3
endif

ifndef SCYLLA_VERSION
SCYLLA_VERSION := release:2025.3
endif
Expand Down Expand Up @@ -242,13 +254,19 @@ install-clang-format-if-missing: update-apt-cache-if-needed
)

install-ccm-if-missing:
@ccm list >/dev/null 2>&1 || (
@$(CCM_BIN) list >/dev/null 2>&1 || (
echo "CCM not found in the system, install it."
pip3 install --user https://github.com/scylladb/scylla-ccm/archive/${CCM_COMMIT_ID}.zip
mkdir -p "$(dir $(CCM_SOURCE_DIR))" && \
rm -rf "$(CCM_SOURCE_DIR)" && \
git clone --depth 1 --branch "${CCM_COMMIT_ID}" https://github.com/scylladb/scylla-ccm.git "$(CCM_SOURCE_DIR)" && \
python3 -m pip install --user ${CCM_PIP_DEPENDENCIES}
)

install-ccm:
@pip3 install --user https://github.com/scylladb/scylla-ccm/archive/${CCM_COMMIT_ID}.zip
@mkdir -p "$(dir $(CCM_SOURCE_DIR))" && \
rm -rf "$(CCM_SOURCE_DIR)" && \
git clone --depth 1 --branch "${CCM_COMMIT_ID}" https://github.com/scylladb/scylla-ccm.git "$(CCM_SOURCE_DIR)" && \
python3 -m pip install --user ${CCM_PIP_DEPENDENCIES}

install-java8-if-missing:
@dpkg -l openjdk-8-jre >/dev/null 2>&1 && exit 0
Expand Down Expand Up @@ -431,14 +449,14 @@ download-ccm-scylla-image: install-ccm-if-missing
@echo "Downloading scylla ${SCYLLA_VERSION} CCM image"
@rm -rf /tmp/download-scylla.ccm || true
@mkdir /tmp/download-scylla.ccm || true
@ccm create ccm_1 -i 127.0.1. -n 3:0 -v "${SCYLLA_VERSION}" --scylla --config-dir=/tmp/download-scylla.ccm
@$(CCM_BIN) create ccm_1 -i 127.0.1. -n 3:0 -v "${SCYLLA_VERSION}" --scylla --config-dir=/tmp/download-scylla.ccm
@rm -rf /tmp/download-scylla.ccm

download-ccm-cassandra-image: install-ccm-if-missing
@echo "Downloading cassandra ${CASSANDRA_VERSION} CCM image"
@rm -rf /tmp/download-cassandra.ccm || true
@mkdir /tmp/download-cassandra.ccm || true
@ccm create ccm_1 -i 127.0.1. -n 3:0 -v "${CASSANDRA_VERSION}" --config-dir=/tmp/download-cassandra.ccm
@$(CCM_BIN) create ccm_1 -i 127.0.1. -n 3:0 -v "${CASSANDRA_VERSION}" --config-dir=/tmp/download-cassandra.ccm
@rm -rf /tmp/download-cassandra.ccm

run-test-integration-scylla: .prepare-environment-update-aio-max-nr
Expand Down
22 changes: 22 additions & 0 deletions ci/ccm
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -euo pipefail

source_ccm="${CCM_SOURCE_DIR:-$HOME/.ccm/scylla-ccm}"
if [ -n "$source_ccm" ] && [ -f "$source_ccm/ccm" ]; then
export PYTHONPATH="$source_ccm${PYTHONPATH:+:$PYTHONPATH}"
exec python3 "$source_ccm/ccm" "$@"
fi

user_ccm="$(python3 -m site --user-base)/bin/ccm"
if [ -f "$user_ccm" ]; then
exec python3 "$user_ccm" "$@"
fi

user_site="$(python3 -m site --user-site)"
if [ -n "${PYTHONPATH:-}" ]; then
export PYTHONPATH="${user_site}:${PYTHONPATH}"
else
export PYTHONPATH="${user_site}"
fi

exec python3 -c 'from ccmlib.bin import main; main()' "$@"
Loading
Loading