Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
96bef02
wip
joao-r-reis Oct 20, 2025
a982646
wip
joao-r-reis Oct 29, 2025
e056e50
wip
joao-r-reis Oct 31, 2025
86ebcd4
wip
joao-r-reis Nov 1, 2025
43fcb39
wip
joao-r-reis Nov 13, 2025
58b657f
wrap up v5 implementation
joao-r-reis Nov 13, 2025
53f6051
add unit tests and fix a couple of bugs
joao-r-reis Nov 14, 2025
cade26b
Automated gofmt changes
Nov 15, 2025
cbb16c7
cleanup
joao-r-reis Nov 15, 2025
033c34f
Merge branch 'protov5' of https://github.com/datastax/zdm-proxy into …
joao-r-reis Nov 15, 2025
789cd57
update gocql to v2
joao-r-reis Nov 15, 2025
179c12d
update nbtest
joao-r-reis Nov 15, 2025
7541153
workaround gocql bug and add matrix to tests
joao-r-reis Nov 15, 2025
37f7c44
update ccm and add gocql compression bug workaround
joao-r-reis Nov 15, 2025
9b674b6
fix ci
joao-r-reis Nov 15, 2025
e39e092
fix bug
joao-r-reis Nov 15, 2025
0371f6d
fix ci
joao-r-reis Nov 15, 2025
ec048fb
fix ci
joao-r-reis Nov 15, 2025
bad3468
upgrade nbtest
joao-r-reis Nov 18, 2025
5849af0
set script as executable
joao-r-reis Nov 18, 2025
889b314
use ubuntu base image instead of nb
joao-r-reis Nov 18, 2025
bc64ad1
fix nbtest
joao-r-reis Nov 18, 2025
d669ad6
remove cqlsh dependency from nbtest
joao-r-reis Nov 18, 2025
2f2dd5a
fix nb
joao-r-reis Nov 18, 2025
00b5782
update executable
joao-r-reis Nov 18, 2025
a0b81d5
fix
joao-r-reis Nov 18, 2025
e552e4d
install nc
joao-r-reis Nov 18, 2025
ffdcb29
fix
joao-r-reis Nov 18, 2025
1f94ccb
fix
joao-r-reis Nov 18, 2025
de22909
fix
joao-r-reis Nov 19, 2025
47f7233
use cassandra 4 and 5 in nb tests
joao-r-reis Nov 19, 2025
8539b66
log protocol version in handshake successful log message
joao-r-reis Nov 19, 2025
c491ea0
log compression as well
joao-r-reis Nov 19, 2025
2919530
attempt enable compression for write NB job only
joao-r-reis Nov 19, 2025
e41857b
attempt compression again
joao-r-reis Nov 19, 2025
42553a4
3rd attempt
joao-r-reis Nov 19, 2025
c8b5c84
attempt
joao-r-reis Nov 19, 2025
88003f8
increase nb log level
joao-r-reis Nov 19, 2025
e12f8b3
revert compression nb changes
joao-r-reis Nov 19, 2025
7e4a946
set info level on driver logs
joao-r-reis Nov 19, 2025
2ba5a7f
driverlogging
joao-r-reis Nov 19, 2025
5b58a27
fix
joao-r-reis Nov 19, 2025
87f7fa9
cache ccm repo in GH action
joao-r-reis Nov 19, 2025
96ac672
fix ci
joao-r-reis Nov 19, 2025
e17beb1
cache go and simulacron
joao-r-reis Nov 19, 2025
5da33f8
fix workflow
joao-r-reis Nov 19, 2025
50818b6
fix paths
joao-r-reis Nov 19, 2025
6279d04
override ring delay when starting cassandra
joao-r-reis Nov 19, 2025
cfbbabb
update version and changelog
joao-r-reis Nov 24, 2025
df01b80
add dse versions to matrix, fix bug with prepared intercept queries
joao-r-reis Nov 27, 2025
fc69b50
fix protocol version used in tests
joao-r-reis Nov 27, 2025
46a695b
fix tests
joao-r-reis Nov 27, 2025
06b8f95
fix tests
joao-r-reis Nov 27, 2025
43f6420
skip tls tests for dse 5.1
joao-r-reis Nov 27, 2025
ea92e84
make write buffer size behavior in v5 equal as v2-v4
joao-r-reis Dec 10, 2025
5a45da8
add activity for fallouttest
joao-r-reis Dec 10, 2025
c224a3b
address PR feedback
joao-r-reis Dec 17, 2025
1bc13d0
PR feedback
joao-r-reis Dec 19, 2025
ec64801
pr feedback
joao-r-reis Dec 19, 2025
1f751d6
wip blocked version feature
joao-r-reis Jan 14, 2026
3edd0a7
add blocked version integration tests
joao-r-reis Jan 14, 2026
1e9f2f0
fix CI
joao-r-reis Jan 14, 2026
8c86923
address PR feedback
joao-r-reis Jan 16, 2026
1f71615
fix test bug
joao-r-reis Jan 16, 2026
a30b683
add changelog and release notes
joao-r-reis Jan 16, 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
144 changes: 125 additions & 19 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,42 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
SIMULACRON_VERSION: 0.10.0
GO_VERSION: 1.24.2
jobs:
dependencies:
name: Fetch dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v4
id: restore-go
with:
path: ~/deps/godl
key: ${{ runner.os }}-deps-godl-${{ env.GO_VERSION }}

- uses: actions/cache@v4
id: restore-simulacron
with:
path: ~/deps/simulacron
key: ${{ runner.os }}-deps-simulacron-${{ env.SIMULACRON_VERSION }}

- if: ${{ steps.restore-go.outputs.cache-hit != 'true' }}
name: Download Go
continue-on-error: true
run: |
mkdir -p ~/deps/godl
cd ~/deps/godl
wget -O go.tar.gz https://go.dev/dl/go${{ env.GO_VERSION }}.linux-amd64.tar.gz

- if: ${{ steps.restore-simulacron.outputs.cache-hit != 'true' }}
name: Download simulacron
continue-on-error: true
run: |
mkdir -p ~/deps/simulacron
cd ~/deps/simulacron
wget -O simulacron.jar https://github.com/datastax/simulacron/releases/download/${{ env.SIMULACRON_VERSION }}/simulacron-standalone-${{ env.SIMULACRON_VERSION }}.jar

# Runs a NoSQLBench job in docker-compose with 3 proxy nodes
# Verifies the written data matches in both ORIGIN and TARGET clusters
nosqlbench-tests:
Expand All @@ -20,7 +55,7 @@ jobs:
- name: Start docker-compose
id: compose
run: |
docker compose -f docker-compose-tests.yml up --abort-on-container-exit --exit-code-from=nosqlbench
docker compose -f docker-compose-tests.yml up --abort-on-container-exit --exit-code-from=nosqlbench4
- name: Test Summary
if: ${{ failure() }}
run: |
Expand All @@ -29,15 +64,20 @@ jobs:
# Runs all the unit tests under the proxy module (all the *_test.go files)
unit-tests:
name: Unit Tests
needs: dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v4
id: restore-go
with:
path: ~/deps/godl
key: ${{ runner.os }}-deps-godl-${{ env.GO_VERSION }}
- name: Run
run: |
sudo apt update
sudo apt -y install default-jre gcc git wget
wget https://go.dev/dl/go1.24.2.linux-amd64.tar.gz
sudo tar -xzf go*.tar.gz -C /usr/local/
sudo tar -xzf ~/deps/godl/go.tar.gz -C /usr/local/
export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:`go env GOPATH`/bin
go install github.com/jstemmer/go-junit-report/v2@latest
Expand All @@ -52,21 +92,35 @@ jobs:
# These tests use Simulacron and in-memory CQLServer
integration-tests-mock:
name: Mock Tests
needs: dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/cache@v4
id: restore-go
with:
path: ~/deps/godl
key: ${{ runner.os }}-deps-godl-${{ env.GO_VERSION }}

- uses: actions/cache@v4
id: restore-simulacron
with:
path: ~/deps/simulacron
key: ${{ runner.os }}-deps-simulacron-${{ env.SIMULACRON_VERSION }}

- name: Run
run: |
sudo apt update
sudo apt -y install openjdk-8-jdk gcc git wget
wget https://go.dev/dl/go1.24.2.linux-amd64.tar.gz
sudo tar -xzf go*.tar.gz -C /usr/local/
sudo tar -xzf ~/deps/godl/go.tar.gz -C /usr/local/
export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:`go env GOPATH`/bin
go install github.com/jstemmer/go-junit-report/v2@latest
wget https://github.com/datastax/simulacron/releases/download/0.10.0/simulacron-standalone-0.10.0.jar
export SIMULACRON_PATH=`pwd`/simulacron-standalone-0.10.0.jar
cp ~/deps/simulacron/simulacron.jar .
export SIMULACRON_PATH=`pwd`/simulacron.jar
go test -timeout 180m -v 2>&1 ./integration-tests | go-junit-report -set-exit-code -iocopy -out report-integration-mock.xml

- name: Test Summary
uses: test-summary/action@v1
if: always()
Expand All @@ -76,26 +130,63 @@ jobs:
# Runs integration tests using CCM
integration-tests-ccm:
name: CCM Tests
needs: dependencies
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cassandra_version: [ '2.2.19', '3.11.19', '4.1.9', '5.0.6', 'dse-4.8.16', 'dse-5.1.48', 'dse-6.8.61' ]
steps:
- uses: actions/checkout@v2

- uses: actions/cache@v4
id: restore-go
with:
path: ~/deps/godl
key: ${{ runner.os }}-deps-godl-${{ env.GO_VERSION }}

- uses: actions/cache@v4
id: restore-cache-ccm
with:
path: ~/.ccm/repository
key: ${{ runner.os }}-ccm-${{ matrix.cassandra_version }}

- name: Run
run: |
sudo apt update

sudo apt -y install openjdk-8-jdk gcc git wget pip
wget https://go.dev/dl/go1.24.2.linux-amd64.tar.gz
sudo tar -xzf go*.tar.gz -C /usr/local/
export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:`go env GOPATH`/bin
sudo apt -y install openjdk-11-jdk gcc git wget pip

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export JAVA8_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export JAVA11_HOME=/usr/lib/jvm/java-11-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH
java -version

sudo tar -xzf ~/deps/godl/go.tar.gz -C /usr/local/
export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:`go env GOPATH`/bin

go install github.com/jstemmer/go-junit-report/v2@latest
pip install ccm

CCM_VERSION="0e20102c1cad99104969239f1ac375b6fcaa7bbc"
export CCM_VERSION
echo "Install CCM ${CCM_VERSION}"
pip install "git+https://github.com/apache/cassandra-ccm.git@${CCM_VERSION}"

which ccm
sudo ln -s /home/runner/.local/bin/ccm /usr/local/bin/ccm
/usr/local/bin/ccm list
go test -timeout 180m -v 2>&1 ./integration-tests -RUN_MOCKTESTS=false -RUN_CCMTESTS=true | go-junit-report -set-exit-code -iocopy -out report-integration-ccm.xml

go test -timeout 180m -v 2>&1 ./integration-tests -RUN_MOCKTESTS=false -RUN_CCMTESTS=true -CASSANDRA_VERSION=${{ matrix.cassandra_version }} | go-junit-report -set-exit-code -iocopy -out report-integration-ccm.xml

- uses: actions/cache/save@v4
if: always()
with:
path: ~/.ccm/repository
key: ${{ runner.os }}-ccm-${{ matrix.cassandra_version }}

- name: Test Summary
uses: test-summary/action@v1
if: always()
Expand All @@ -105,21 +196,31 @@ jobs:
# Runs the mock tests with go's race checker to spot potential data races
race-checker:
name: Race Checker
needs: dependencies
runs-on: ubuntu-latest
if: ${{ false }} # temporarily disabled
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v4
id: restore-simulacron
with:
path: ~/deps/simulacron
key: ${{ runner.os }}-deps-simulacron-${{ env.SIMULACRON_VERSION }}
- uses: actions/cache@v4
id: restore-go
with:
path: ~/deps/godl
key: ${{ runner.os }}-deps-godl-${{ env.GO_VERSION }}
- name: Run
run: |
sudo apt update
sudo apt -y install openjdk-8-jdk gcc git pip wget
wget https://go.dev/dl/go1.24.2.linux-amd64.tar.gz
sudo tar -xzf go*.tar.gz -C /usr/local/
sudo tar -xzf ~/deps/godl/go.tar.gz -C /usr/local/
export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:`go env GOPATH`/bin
go install github.com/jstemmer/go-junit-report/v2@latest
wget https://github.com/datastax/simulacron/releases/download/0.10.0/simulacron-standalone-0.10.0.jar
export SIMULACRON_PATH=`pwd`/simulacron-standalone-0.10.0.jar
cp ~/deps/simulacron/simulacron.jar .
export SIMULACRON_PATH=`pwd`/simulacron.jar
go test -race -timeout 180m -v 2>&1 ./integration-tests | go-junit-report -set-exit-code -iocopy -out report-integration-race.xml
- name: Test Summary
uses: test-summary/action@v1
Expand All @@ -130,16 +231,21 @@ jobs:
# Performs static analysis to check for things like context leaks
go-vet:
name: Go Vet
needs: dependencies
runs-on: ubuntu-latest
if: ${{ false }} # temporarily disabled
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v4
id: restore-go
with:
path: ~/deps/godl
key: ${{ runner.os }}-deps-godl-${{ env.GO_VERSION }}
- name: Run
run: |
sudo apt update
sudo apt -y install openjdk-8-jdk gcc git pip wget
wget https://go.dev/dl/go1.24.2.linux-amd64.tar.gz
sudo tar -xzf go*.tar.gz -C /usr/local/
sudo tar -xzf ~/deps/godl/go.tar.gz -C /usr/local/
export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:`go env GOPATH`/bin
go vet ./...
5 changes: 0 additions & 5 deletions CHANGELOG/CHANGELOG-2.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ Changelog for the ZDM Proxy, new PRs should update the `unreleased` section.

When cutting a new release, update the `unreleased` heading to the tag being generated and date, like `## vX.Y.Z - YYYY-MM-DD` and create a new placeholder section for `unreleased` entries.

## Unreleased

* [#150](https://github.com/datastax/zdm-proxy/issues/150): CQL request tracing
* [#154](https://github.com/datastax/zdm-proxy/issues/154): Support CQL request compression

---

## v2.3.4 - 2025-05-29
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG/CHANGELOG-2.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Changelog

Changelog for the ZDM Proxy, new PRs should update the `unreleased` section.

When cutting a new release, update the `unreleased` heading to the tag being generated and date, like `## vX.Y.Z - YYYY-MM-DD` and create a new placeholder section for `unreleased` entries.

---

## v2.4.0 - 2026-01-16

### New Features

* [#150](https://github.com/datastax/zdm-proxy/issues/150): CQL request tracing
* [#154](https://github.com/datastax/zdm-proxy/issues/154): Support CQL request compression
* [#157](https://github.com/datastax/zdm-proxy/pull/157): Support protocol v5
* [#157](https://github.com/datastax/zdm-proxy/pull/157): New Configuration setting to block specific protocol versions

### Improvements

* [#157](https://github.com/datastax/zdm-proxy/pull/157): Improvements to CI so we can find regressions with multiple C* versions before merging a PR
12 changes: 12 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ Build artifacts are available at [Docker Hub](https://hub.docker.com/repository/

For additional details on the changes included in a specific release, see the associated CHANGELOG-x.x.md file.

## v2.4.0 - 2026-01-16

Support LZ4 and snappy compression.

Support protocol v5.

New configuration setting `ZDM_BLOCKED_PROTOCOL_VERSIONS` to block specific protocol versions at the proxy level.

Send request id in the request payload (currently supported by Astra only).

[Changelog](CHANGELOG/CHANGELOG-2.4.md#v240---2026-01-16)

## v2.3.4 - 2025-05-29

Fix CQL stream ID validation for internal heartbeat mechanism.
Expand Down
78 changes: 0 additions & 78 deletions compose/nosqlbench-entrypoint.sh

This file was deleted.

Loading
Loading