Skip to content
Merged
Show file tree
Hide file tree
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
138 changes: 138 additions & 0 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,144 @@ jobs:
./dbdeployer delete all --skip-confirm 2>/dev/null || true
pkill -9 -u "$USER" mysqld 2>/dev/null || true

# Test Percona Server: single + replication with data verification
percona-test:
name: Percona Server (${{ matrix.percona-version }})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
percona-version:
- '8.0.36-28'
- '8.4.2-2'
env:
GO111MODULE: on
SANDBOX_BINARY: ${{ github.workspace }}/opt/mysql
PERCONA_VERSION: ${{ matrix.percona-version }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: Install system libraries
run: |
sudo apt-get update
sudo apt-get install -y libaio1 libnuma1 libncurses5

- name: Build dbdeployer
run: go build -o dbdeployer .

- name: Download and unpack Percona Server
run: |
# Extract major.minor from version (e.g., "8.0.36-28" -> "8.0")
MAJOR_MINOR=$(echo "$PERCONA_VERSION" | grep -oP '^\d+\.\d+')
GLIBC="glibc2.17"
TARBALL="Percona-Server-${PERCONA_VERSION}-Linux.x86_64.${GLIBC}-minimal.tar.gz"
URL="https://downloads.percona.com/downloads/Percona-Server-${MAJOR_MINOR}/Percona-Server-${PERCONA_VERSION}/binary/tarball/${TARBALL}"
echo "Downloading Percona Server ${PERCONA_VERSION}..."
mkdir -p "$SANDBOX_BINARY"
curl -L -f -o "/tmp/$TARBALL" "$URL" || {
GLIBC="glibc2.35"
TARBALL="Percona-Server-${PERCONA_VERSION}-Linux.x86_64.${GLIBC}-minimal.tar.gz"
URL="https://downloads.percona.com/downloads/Percona-Server-${MAJOR_MINOR}/Percona-Server-${PERCONA_VERSION}/binary/tarball/${TARBALL}"
echo "Retrying with glibc2.35..."
curl -L -f -o "/tmp/$TARBALL" "$URL"
}
./dbdeployer unpack "/tmp/$TARBALL" --sandbox-binary="$SANDBOX_BINARY"

- name: Test single sandbox
run: |
# Extract version without build suffix for deploy
VERSION=$(ls "$SANDBOX_BINARY" | head -1)
echo "Deploying Percona Server $VERSION..."
./dbdeployer deploy single "$VERSION" --sandbox-binary="$SANDBOX_BINARY"
~/sandboxes/msb_*/use -e "SELECT VERSION()" | grep -i percona
echo "OK: Percona Server single sandbox works"
./dbdeployer delete all --skip-confirm

- name: Test replication with data verification
run: |
VERSION=$(ls "$SANDBOX_BINARY" | head -1)
echo "Deploying Percona Server $VERSION replication..."
./dbdeployer deploy replication "$VERSION" --sandbox-binary="$SANDBOX_BINARY"
~/sandboxes/rsandbox_*/test_replication
echo "OK: Percona Server replication works"
./dbdeployer delete all --skip-confirm

- name: Cleanup
if: always()
run: |
./dbdeployer delete all --skip-confirm 2>/dev/null || true
pkill -9 -u "$USER" mysqld 2>/dev/null || true

# Test MariaDB: single + replication with data verification
mariadb-test:
name: MariaDB (${{ matrix.mariadb-version }})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
mariadb-version:
- '10.11.25'
- '11.4.10'
Comment on lines +170 to +173
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Test versions don't match the registry versions being added.

The PR adds MariaDB registry entries for versions 10.6.21, 10.11.11, 11.4.5, 11.7.2, and 11.8.1, but the tests use 10.11.25 and 11.4.10. This means the newly added registry entries aren't actually being tested.

Consider testing at least one version from the registry:

      matrix:
        mariadb-version:
-          - '10.11.25'
-          - '11.4.10'
+          - '10.11.11'
+          - '11.4.5'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
matrix:
mariadb-version:
- '10.11.25'
- '11.4.10'
matrix:
mariadb-version:
- '10.11.11'
- '11.4.5'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/integration_tests.yml around lines 170 - 173, The workflow
matrix for mariadb-version in .github/workflows/integration_tests.yml currently
lists '10.11.25' and '11.4.10', which do not match the new registry entries
added in the PR; update the matrix key "mariadb-version" to include at least one
of the actual registry versions introduced (for example '10.11.11' or '11.4.5')
so the new registry entries are exercised by CI—modify the
matrix.mariadb-version array to add or replace a value with one of {10.6.21,
10.11.11, 11.4.5, 11.7.2, 11.8.1}.

env:
GO111MODULE: on
SANDBOX_BINARY: ${{ github.workspace }}/opt/mysql
MARIADB_VERSION: ${{ matrix.mariadb-version }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: Install system libraries
run: |
sudo apt-get update
sudo apt-get install -y libaio1 libnuma1 libncurses5

- name: Build dbdeployer
run: go build -o dbdeployer .

- name: Download and unpack MariaDB
run: |
TARBALL="mariadb-${MARIADB_VERSION}-linux-x86_64.tar.gz"
URL="https://downloads.mariadb.com/MariaDB/mariadb-${MARIADB_VERSION}/bintar-linux-x86_64/${TARBALL}"
echo "Downloading MariaDB ${MARIADB_VERSION}..."
mkdir -p "$SANDBOX_BINARY"
curl -L -f -o "/tmp/$TARBALL" "$URL"
./dbdeployer unpack "/tmp/$TARBALL" --sandbox-binary="$SANDBOX_BINARY"

- name: Test single sandbox
run: |
echo "Deploying MariaDB ${MARIADB_VERSION}..."
./dbdeployer deploy single "$MARIADB_VERSION" --sandbox-binary="$SANDBOX_BINARY"
~/sandboxes/msb_*/use -e "SELECT VERSION()" | grep -i mariadb
echo "OK: MariaDB single sandbox works"
./dbdeployer delete all --skip-confirm

- name: Test replication with data verification
run: |
echo "Deploying MariaDB ${MARIADB_VERSION} replication..."
./dbdeployer deploy replication "$MARIADB_VERSION" --sandbox-binary="$SANDBOX_BINARY"
SBDIR=$(ls -d ~/sandboxes/rsandbox_*)
# Write on master, verify on slave
$SBDIR/m -e "CREATE DATABASE ci_test; USE ci_test; CREATE TABLE t1(id INT PRIMARY KEY, val VARCHAR(50)); INSERT INTO t1 VALUES (1, 'mariadb_repl_test');"
sleep 2
RESULT=$($SBDIR/s1 -BN -e "SELECT val FROM ci_test.t1;")
echo "Replica result: $RESULT"
echo "$RESULT" | grep -q "mariadb_repl_test" || { echo "FAIL: data not replicated"; exit 1; }
echo "OK: MariaDB replication works"
./dbdeployer delete all --skip-confirm

- name: Cleanup
if: always()
run: |
./dbdeployer delete all --skip-confirm 2>/dev/null || true
pkill -9 -u "$USER" mysqld 2>/dev/null || true

# Run the ts (testscript) replication suite against multiple MySQL versions.
# This tests replication, replication-gtid, and semisync across versions.
ts-replication-test:
Expand Down
Loading
Loading