From f7de1452cac2285f2f7793e2dab2418dc4e12d53 Mon Sep 17 00:00:00 2001 From: Joel Shepherd Date: Tue, 29 Sep 2026 21:08:30 +0000 Subject: [PATCH] ci: remove conflict markers (??) from cassandra workflow definition, stop any running extenddb server before running cassandra tests (which start a new server instance) --- .github/workflows/integration-cassandra.yml | 24 +++------------------ devtools/run-cassandra-tests | 14 ++++++++++++ 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/.github/workflows/integration-cassandra.yml b/.github/workflows/integration-cassandra.yml index 30d8ca81..7e202c17 100644 --- a/.github/workflows/integration-cassandra.yml +++ b/.github/workflows/integration-cassandra.yml @@ -20,10 +20,6 @@ permissions: # # A single-node container is enough: the tests create their own keyspaces # (RF=1) and run serially because the sweep and reconciliation passes are -<<<<<<< HEAD -# global. The stock image uses AllowAllAuthenticator, so the credentials the -# tests and health check send are accepted without an auth challenge. -======= # global. # # The cassandra:4.1 image does not honour CASSANDRA_AUTHENTICATOR, so each job @@ -33,7 +29,6 @@ permissions: # healthy before the patch step runs; after the restart a second wait loop # confirms the node is back up with PasswordAuthenticator active. ->>>>>>> ci/cassandra-integration-workflow jobs: cassandra-storage: runs-on: ubuntu-latest @@ -47,11 +42,7 @@ jobs: HEAP_NEWSIZE: 128M MAX_HEAP_SIZE: 1024M options: >- -<<<<<<< HEAD - --health-cmd "cqlsh -u cassandra -p cassandra -e 'SELECT release_version FROM system.local'" -======= --health-cmd "cqlsh -e 'SELECT release_version FROM system.local'" ->>>>>>> ci/cassandra-integration-workflow --health-interval 15s --health-timeout 10s --health-retries 20 @@ -62,15 +53,13 @@ jobs: - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true -<<<<<<< HEAD -======= - name: Configure Cassandra authentication run: | docker exec ${{ job.services.cassandra.id }} sed -i \ 's/^authenticator: .*/authenticator: PasswordAuthenticator/' \ /etc/cassandra/cassandra.yaml docker restart ${{ job.services.cassandra.id }} - for i in $(seq 1 30); do + for i in $(seq 1 90); do if docker exec ${{ job.services.cassandra.id }} \ cqlsh -u cassandra -p cassandra \ -e 'SELECT release_version FROM system.local' \ @@ -81,23 +70,17 @@ jobs: sleep 2 done echo "Cassandra did not become ready" >&2; exit 1 ->>>>>>> ci/cassandra-integration-workflow - name: Unit tests run: cargo test -p extenddb-storage-cassandra --lib - name: TTL integration tests run: cargo test -p extenddb-storage-cassandra --test ttl_integration -- --test-threads=1 -<<<<<<< HEAD -======= env: EXTENDDB_TEST_CASSANDRA: required ->>>>>>> ci/cassandra-integration-workflow - name: Direct storage-trait integration tests # Ported from the plug-in repo's tests/rust suite. Parallel-safe: # each test provisions its own account and keyspace; the shared # control-plane setting test restores what it mutates. run: cargo test -p extenddb-storage-cassandra --test direct_integration -<<<<<<< HEAD -======= env: EXTENDDB_TEST_CASSANDRA: required @@ -130,7 +113,7 @@ jobs: 's/^authenticator: .*/authenticator: PasswordAuthenticator/' \ /etc/cassandra/cassandra.yaml docker restart ${{ job.services.cassandra.id }} - for i in $(seq 1 30); do + for i in $(seq 1 90); do if docker exec ${{ job.services.cassandra.id }} \ cqlsh -u cassandra -p cassandra \ -e 'SELECT release_version FROM system.local' \ @@ -180,7 +163,7 @@ jobs: 's/^authenticator: .*/authenticator: PasswordAuthenticator/' \ /etc/cassandra/cassandra.yaml docker restart ${{ job.services.cassandra.id }} - for i in $(seq 1 30); do + for i in $(seq 1 90); do if docker exec ${{ job.services.cassandra.id }} \ cqlsh -u cassandra -p cassandra \ -e 'SELECT release_version FROM system.local' \ @@ -224,4 +207,3 @@ jobs: [ "${{ needs.cassandra-production-build.result }}" != "success" ]; then exit 1 fi ->>>>>>> ci/cassandra-integration-workflow diff --git a/devtools/run-cassandra-tests b/devtools/run-cassandra-tests index 26cbfd85..facb4509 100755 --- a/devtools/run-cassandra-tests +++ b/devtools/run-cassandra-tests @@ -166,6 +166,20 @@ level = "info" format = "pretty" TOML +# --------------------------------------------------------------------------- +# Stop any existing server on the target port +# --------------------------------------------------------------------------- + +echo "=== Stopping any existing extenddb server on port $BIND_PORT ===" +"$BINARY" stop >/dev/null 2>&1 || true +# Wait briefly for the port to free +for i in $(seq 1 10); do + if ! curl -sk "https://127.0.0.1:$BIND_PORT/health" >/dev/null 2>&1; then + break + fi + sleep 1 +done + # --------------------------------------------------------------------------- # Start extenddb server # ---------------------------------------------------------------------------