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
22 changes: 12 additions & 10 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,16 @@ jobs:
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"
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 "Downloading Percona Server ${PERCONA_VERSION}..."
echo "Downloading Percona Server ${PERCONA_VERSION} (${GLIBC})..."
mkdir -p "$SANDBOX_BINARY"
curl -L -f -o "/tmp/$TARBALL" "$URL" || {
GLIBC="glibc2.35"
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 "Retrying with glibc2.35..."
echo "Retrying with glibc2.17..."
curl -L -f -o "/tmp/$TARBALL" "$URL"
}
./dbdeployer unpack "/tmp/$TARBALL" --sandbox-binary="$SANDBOX_BINARY"
Expand Down Expand Up @@ -169,8 +169,8 @@ jobs:
fail-fast: false
matrix:
mariadb-version:
- '10.11.25'
- '11.4.10'
- '10.11.9'
- '11.4.5'
env:
GO111MODULE: on
SANDBOX_BINARY: ${{ github.workspace }}/opt/mysql
Expand All @@ -192,8 +192,8 @@ jobs:

- 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}"
TARBALL="mariadb-${MARIADB_VERSION}-linux-systemd-x86_64.tar.gz"
URL="https://archive.mariadb.org/mariadb-${MARIADB_VERSION}/bintar-linux-systemd-x86_64/${TARBALL}"
echo "Downloading MariaDB ${MARIADB_VERSION}..."
mkdir -p "$SANDBOX_BINARY"
curl -L -f -o "/tmp/$TARBALL" "$URL"
Expand Down Expand Up @@ -253,7 +253,7 @@ jobs:
- name: Download MySQL versions
run: |
mkdir -p "$SANDBOX_BINARY"
for VER in 5.7.44 8.0.42 8.4.8 9.5.0; do
for VER in 8.0.42 8.4.8 9.5.0; do
SHORT="${VER%.*}"
TARBALL="mysql-${VER}-linux-glibc2.17-x86_64-minimal.tar.xz"
echo "Downloading $VER..."
Expand All @@ -269,7 +269,7 @@ jobs:

- name: Run ts replication tests (MySQL)
env:
TEST_SHORT_VERSIONS: "5.7,8.0,8.4,9.5"
TEST_SHORT_VERSIONS: "8.0,8.4,9.5"
run: |
export HOME="$GITHUB_WORKSPACE/home"
mkdir -p "$HOME/sandboxes" "$HOME/.dbdeployer"
Expand Down Expand Up @@ -403,6 +403,8 @@ jobs:
PG_FULL=$(ls ~/opt/postgresql/ | head -1)
echo "=== Deploying PostgreSQL $PG_FULL multiple (3 nodes) ==="
./dbdeployer deploy multiple "$PG_FULL" --provider=postgresql --nodes=3
echo "=== Waiting for nodes to start ==="
sleep 5
echo "=== Checking topology dir ==="
ls ~/sandboxes/multi_msb_*/
echo "=== Connect to node1 ==="
Expand Down
247 changes: 65 additions & 182 deletions downloads/tarball_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -3121,188 +3121,6 @@
"notes": "added with version 2.0.0",
"date_added": "2026-03-24 00:00"
},
{
"name": "mariadb-10.6.25-linux-x86_64.tar.gz",
"OS": "Linux",
"arch": "amd64",
"url": "https://downloads.mariadb.com/MariaDB/mariadb-10.6.25/bintar-linux-x86_64/mariadb-10.6.25-linux-x86_64.tar.gz",
"flavor": "mariadb",
"minimal": false,
"size": 0,
"short_version": "10.6",
"version": "10.6.25",
"notes": "added with version 2.1.1",
"date_added": "2026-04-05 00:00"
},
{
"name": "mariadb-10.6.25-linux-aarch64.tar.gz",
"OS": "Linux",
"arch": "arm64",
"url": "https://downloads.mariadb.com/MariaDB/mariadb-10.6.25/bintar-linux-aarch64/mariadb-10.6.25-linux-aarch64.tar.gz",
"flavor": "mariadb",
"minimal": false,
"size": 0,
"short_version": "10.6",
"version": "10.6.25",
"notes": "added with version 2.1.1",
"date_added": "2026-04-05 00:00"
},
{
"name": "mariadb-10.11.25-linux-x86_64.tar.gz",
"OS": "Linux",
"arch": "amd64",
"url": "https://downloads.mariadb.com/MariaDB/mariadb-10.11.25/bintar-linux-x86_64/mariadb-10.11.25-linux-x86_64.tar.gz",
"flavor": "mariadb",
"minimal": false,
"size": 0,
"short_version": "10.11",
"version": "10.11.25",
"notes": "added with version 2.1.1",
"date_added": "2026-04-05 00:00"
},
{
"name": "mariadb-10.11.25-linux-aarch64.tar.gz",
"OS": "Linux",
"arch": "arm64",
"url": "https://downloads.mariadb.com/MariaDB/mariadb-10.11.25/bintar-linux-aarch64/mariadb-10.11.25-linux-aarch64.tar.gz",
"flavor": "mariadb",
"minimal": false,
"size": 0,
"short_version": "10.11",
"version": "10.11.25",
"notes": "added with version 2.1.1",
"date_added": "2026-04-05 00:00"
},
{
"name": "mariadb-11.0.10-linux-x86_64.tar.gz",
"OS": "Linux",
"arch": "amd64",
"url": "https://downloads.mariadb.com/MariaDB/mariadb-11.0.10/bintar-linux-x86_64/mariadb-11.0.10-linux-x86_64.tar.gz",
"flavor": "mariadb",
"minimal": false,
"size": 0,
"short_version": "11.0",
"version": "11.0.10",
"notes": "added with version 2.1.1",
"date_added": "2026-04-05 00:00"
},
{
"name": "mariadb-11.1.10-linux-x86_64.tar.gz",
"OS": "Linux",
"arch": "amd64",
"url": "https://downloads.mariadb.com/MariaDB/mariadb-11.1.10/bintar-linux-x86_64/mariadb-11.1.10-linux-x86_64.tar.gz",
"flavor": "mariadb",
"minimal": false,
"size": 0,
"short_version": "11.1",
"version": "11.1.10",
"notes": "added with version 2.1.1",
"date_added": "2026-04-05 00:00"
},
{
"name": "mariadb-11.2.10-linux-x86_64.tar.gz",
"OS": "Linux",
"arch": "amd64",
"url": "https://downloads.mariadb.com/MariaDB/mariadb-11.2.10/bintar-linux-x86_64/mariadb-11.2.10-linux-x86_64.tar.gz",
"flavor": "mariadb",
"minimal": false,
"size": 0,
"short_version": "11.2",
"version": "11.2.10",
"notes": "added with version 2.1.1",
"date_added": "2026-04-05 00:00"
},
{
"name": "mariadb-11.3.10-linux-x86_64.tar.gz",
"OS": "Linux",
"arch": "amd64",
"url": "https://downloads.mariadb.com/MariaDB/mariadb-11.3.10/bintar-linux-x86_64/mariadb-11.3.10-linux-x86_64.tar.gz",
"flavor": "mariadb",
"minimal": false,
"size": 0,
"short_version": "11.3",
"version": "11.3.10",
"notes": "added with version 2.1.1",
"date_added": "2026-04-05 00:00"
},
{
"name": "mariadb-11.4.10-linux-x86_64.tar.gz",
"OS": "Linux",
"arch": "amd64",
"url": "https://downloads.mariadb.com/MariaDB/mariadb-11.4.10/bintar-linux-x86_64/mariadb-11.4.10-linux-x86_64.tar.gz",
"flavor": "mariadb",
"minimal": false,
"size": 0,
"short_version": "11.4",
"version": "11.4.10",
"notes": "added with version 2.1.1",
"date_added": "2026-04-05 00:00"
},
{
"name": "mariadb-11.4.10-linux-aarch64.tar.gz",
"OS": "Linux",
"arch": "arm64",
"url": "https://downloads.mariadb.com/MariaDB/mariadb-11.4.10/bintar-linux-aarch64/mariadb-11.4.10-linux-aarch64.tar.gz",
"flavor": "mariadb",
"minimal": false,
"size": 0,
"short_version": "11.4",
"version": "11.4.10",
"notes": "added with version 2.1.1",
"date_added": "2026-04-05 00:00"
},
{
"name": "mariadb-11.5.10-linux-x86_64.tar.gz",
"OS": "Linux",
"arch": "amd64",
"url": "https://downloads.mariadb.com/MariaDB/mariadb-11.5.10/bintar-linux-x86_64/mariadb-11.5.10-linux-x86_64.tar.gz",
"flavor": "mariadb",
"minimal": false,
"size": 0,
"short_version": "11.5",
"version": "11.5.10",
"notes": "added with version 2.1.1",
"date_added": "2026-04-05 00:00"
},
{
"name": "mariadb-11.6.10-linux-x86_64.tar.gz",
"OS": "Linux",
"arch": "amd64",
"url": "https://downloads.mariadb.com/MariaDB/mariadb-11.6.10/bintar-linux-x86_64/mariadb-11.6.10-linux-x86_64.tar.gz",
"flavor": "mariadb",
"minimal": false,
"size": 0,
"short_version": "11.6",
"version": "11.6.10",
"notes": "added with version 2.1.1",
"date_added": "2026-04-05 00:00"
},
{
"name": "mariadb-11.7.10-linux-x86_64.tar.gz",
"OS": "Linux",
"arch": "amd64",
"url": "https://downloads.mariadb.com/MariaDB/mariadb-11.7.10/bintar-linux-x86_64/mariadb-11.7.10-linux-x86_64.tar.gz",
"flavor": "mariadb",
"minimal": false,
"size": 0,
"short_version": "11.7",
"version": "11.7.10",
"notes": "added with version 2.1.1",
"date_added": "2026-04-05 00:00"
},
{
"name": "mariadb-11.8.10-linux-x86_64.tar.gz",
"OS": "Linux",
"arch": "amd64",
"url": "https://downloads.mariadb.com/MariaDB/mariadb-11.8.10/bintar-linux-x86_64/mariadb-11.8.10-linux-x86_64.tar.gz",
"flavor": "mariadb",
"minimal": false,
"size": 0,
"short_version": "11.8",
"version": "11.8.10",
"notes": "added with version 2.1.1",
"date_added": "2026-04-05 00:00"
},
{
"name": "Percona-Server-5.7.41-44-Linux.x86_64.glibc2.17-minimal.tar.gz",
"OS": "Linux",
Expand Down Expand Up @@ -3484,6 +3302,71 @@
"version": "8.4.4",
"notes": "added with version 2.1.1",
"date_added": "2026-04-05 00:00"
},
{
"name": "mariadb-10.6.9-linux-systemd-x86_64.tar.gz",
"OS": "Linux",
"arch": "amd64",
"url": "https://archive.mariadb.org/mariadb-10.6.9/bintar-linux-systemd-x86_64/mariadb-10.6.9-linux-systemd-x86_64.tar.gz",
"flavor": "mariadb",
"minimal": false,
"size": 0,
"short_version": "10.6",
"version": "10.6.9",
"notes": "archive.mariadb.org LTS",
"date_added": "2026-04-02 00:00"
},
{
"name": "mariadb-10.11.9-linux-systemd-x86_64.tar.gz",
"OS": "Linux",
"arch": "amd64",
"url": "https://archive.mariadb.org/mariadb-10.11.9/bintar-linux-systemd-x86_64/mariadb-10.11.9-linux-systemd-x86_64.tar.gz",
"flavor": "mariadb",
"minimal": false,
"size": 0,
"short_version": "10.11",
"version": "10.11.9",
"notes": "archive.mariadb.org LTS",
"date_added": "2026-04-02 00:00"
},
{
"name": "mariadb-11.4.5-linux-systemd-x86_64.tar.gz",
"OS": "Linux",
"arch": "amd64",
"url": "https://archive.mariadb.org/mariadb-11.4.5/bintar-linux-systemd-x86_64/mariadb-11.4.5-linux-systemd-x86_64.tar.gz",
"flavor": "mariadb",
"minimal": false,
"size": 0,
"short_version": "11.4",
"version": "11.4.5",
"notes": "archive.mariadb.org LTS",
"date_added": "2026-04-02 00:00"
},
{
"name": "mariadb-11.4.9-linux-systemd-x86_64.tar.gz",
"OS": "Linux",
"arch": "amd64",
"url": "https://archive.mariadb.org/mariadb-11.4.9/bintar-linux-systemd-x86_64/mariadb-11.4.9-linux-systemd-x86_64.tar.gz",
"flavor": "mariadb",
"minimal": false,
"size": 0,
"short_version": "11.4",
"version": "11.4.9",
"notes": "archive.mariadb.org LTS",
"date_added": "2026-04-02 00:00"
},
{
"name": "mariadb-11.8.6-linux-systemd-x86_64.tar.gz",
"OS": "Linux",
"arch": "amd64",
"url": "https://archive.mariadb.org/mariadb-11.8.6/bintar-linux-systemd-x86_64/mariadb-11.8.6-linux-systemd-x86_64.tar.gz",
"flavor": "mariadb",
"minimal": false,
"size": 0,
"short_version": "11.8",
"version": "11.8.6",
"notes": "archive.mariadb.org short-term",
"date_added": "2026-04-02 00:00"
}
Comment on lines +3306 to 3370
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 | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify MariaDB archive URLs exist and are accessible

URLS=(
  "https://archive.mariadb.org/mariadb-10.6.9/bintar-linux-systemd-x86_64/mariadb-10.6.9-linux-systemd-x86_64.tar.gz"
  "https://archive.mariadb.org/mariadb-10.11.9/bintar-linux-systemd-x86_64/mariadb-10.11.9-linux-systemd-x86_64.tar.gz"
  "https://archive.mariadb.org/mariadb-11.4.5/bintar-linux-systemd-x86_64/mariadb-11.4.5-linux-systemd-x86_64.tar.gz"
  "https://archive.mariadb.org/mariadb-11.4.9/bintar-linux-systemd-x86_64/mariadb-11.4.9-linux-systemd-x86_64.tar.gz"
  "https://archive.mariadb.org/mariadb-11.8.6/bintar-linux-systemd-x86_64/mariadb-11.8.6-linux-systemd-x86_64.tar.gz"
)

for url in "${URLS[@]}"; do
  echo "Checking: $url"
  status=$(curl -sI -o /dev/null -w "%{http_code}" "$url" 2>/dev/null)
  if [ "$status" = "200" ] || [ "$status" = "302" ]; then
    echo "  ✓ OK (HTTP $status)"
  else
    echo "  ✗ FAILED (HTTP $status)"
  fi
done

Repository: ProxySQL/dbdeployer

Length of output: 774


🏁 Script executed:

# Check the tarball_list.json structure for checksums and sizes
# Get a sample of entries to understand the pattern
head -c 5000 downloads/tarball_list.json | tail -c 2000

Repository: ProxySQL/dbdeployer

Length of output: 2063


🏁 Script executed:

# Search for entries with checksums to understand the pattern
rg -A 10 '"checksum"' downloads/tarball_list.json | head -50

Repository: ProxySQL/dbdeployer

Length of output: 2071


🏁 Script executed:

# Check if other MariaDB entries (if any) in the file have checksums
rg -B 5 -A 5 'archive.mariadb.org' downloads/tarball_list.json

Repository: ProxySQL/dbdeployer

Length of output: 2356


🏁 Script executed:

# Check how many entries have size: 0 vs populated sizes
rg '"size": 0' downloads/tarball_list.json | wc -l
rg '"size": [1-9]' downloads/tarball_list.json | head -5

Repository: ProxySQL/dbdeployer

Length of output: 188


🏁 Script executed:

# Search for code that validates checksums
rg -i 'checksum' --type go --type js --type py | head -20

Repository: ProxySQL/dbdeployer

Length of output: 1848


🏁 Script executed:

# Look for how the tarball_list.json is loaded and used
rg 'tarball_list' --type go -A 5 | head -40

Repository: ProxySQL/dbdeployer

Length of output: 831


🏁 Script executed:

# Check if there's checksum validation in the download logic
rg -i 'sha512|sha256|md5|integrity|verify' --type go | grep -i 'download\|checksum' | head -15

Repository: ProxySQL/dbdeployer

Length of output: 1600


🏁 Script executed:

# Get the full validation function to understand the impact
rg -A 20 'if tb.Checksum == "" && tb.Flavor != "tidb"' downloads/remote_registry.go

Repository: ProxySQL/dbdeployer

Length of output: 792


🏁 Script executed:

# Check if there's checksum validation at load time
rg -B 5 -A 10 'ValidateTarballRegistry\|CheckTarballRegistry' downloads/remote_registry.go | head -50

Repository: ProxySQL/dbdeployer

Length of output: 45


🏁 Script executed:

# Verify if archive.mariadb.org provides checksum files
# Try to fetch the SHA256SUM file for one of the versions
curl -sI https://archive.mariadb.org/mariadb-10.6.9/bintar-linux-systemd-x86_64/SHA256SUMS 2>&1 | head -10
curl -sI https://archive.mariadb.org/mariadb-10.6.9/bintar-linux-systemd-x86_64/sha256sum.txt 2>&1 | head -10

Repository: ProxySQL/dbdeployer

Length of output: 319


Checksums are required and missing—these entries will fail validation.

The five MariaDB entries cannot be used without checksums. The tarball registry validation code explicitly rejects entries with missing checksums for all flavors except tidb (mariadb entries are not exempted):

if tb.Checksum == "" && tb.Flavor != "tidb" {
    tarballErrorList = append(tarballErrorList, tarballError{tb.Name, "checksum is missing"})
}

You must populate the checksum field using the format "SHA512:CHECKSUM_VALUE" or "MD5:CHECKSUM_VALUE". Note that archive.mariadb.org does not provide standard checksum files (SHA256SUMS, sha256sum.txt both return 404), so you may need to download the tarballs and compute their checksums locally using sha512sum, or check if MariaDB provides checksums through an alternate method.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@downloads/tarball_list.json` around lines 3306 - 3370, The five MariaDB
tarball entries (mariadb-10.6.9-linux-systemd-x86_64.tar.gz,
mariadb-10.11.9-linux-systemd-x86_64.tar.gz,
mariadb-11.4.5-linux-systemd-x86_64.tar.gz,
mariadb-11.4.9-linux-systemd-x86_64.tar.gz,
mariadb-11.8.6-linux-systemd-x86_64.tar.gz) are missing the checksum field and
will be rejected by the registrar check that inspects tb.Checksum (and exempts
only tb.Flavor == "tidb"); download each tarball, compute a strong digest
(prefer SHA512 via sha512sum), then add a checksum property in the JSON for each
entry in the form "checksum": "SHA512:CHECKSUM_VALUE" (or "MD5:..." if you
must), ensuring the checksum string exactly matches the format expected by the
validator.

]
}
3 changes: 1 addition & 2 deletions sandbox/innodb_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ func CreateInnoDBCluster(sandboxDef SandboxDef, origin string, nodes int, master
// InnoDB Cluster always uses single-primary mode by default
// The primary is node 1, the rest are secondaries
masterList := "1"
slaveList := makeNodesList(nodes)
slaveList = ""
slaveList := ""
for N := 2; N <= nodes; N++ {
if slaveList != "" {
slaveList += " "
Expand Down
4 changes: 2 additions & 2 deletions ts/templates/multi-source/all-masters.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ exec $sb_dir/check_ms_nodes
stdout '# Master 1'
stdout '# Master 2'
stdout '# Master 3'
stdout -count=6 'Slave_IO_Running: Yes'
stdout -count=6 'Slave_SQL_Running: Yes'
stdout -count=6 '(Slave|Replica)_IO_Running: Yes'
stdout -count=6 '(Slave|Replica)_SQL_Running: Yes'
! stderr .

check_sandbox_manifest $sb_dir multi_source
Expand Down
5 changes: 3 additions & 2 deletions ts/templates/multi-source/fan-in.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ exists $sb_dir
exec $sb_dir/check_ms_nodes
stdout '# Master 1'
stdout '# Master 2'
stdout -count=2 'Slave_IO_Running: Yes'
stdout -count=2 'Slave_SQL_Running: Yes'
stdout -count=2 '(Slave|Replica)_IO_Running: Yes'
stdout -count=2 '(Slave|Replica)_SQL_Running: Yes'
! stderr .

check_sandbox_manifest $sb_dir multi_source
Expand All @@ -33,6 +33,7 @@ env required_ports=3
[version_is_at_least:$db_version:8.0.0] env required_ports=6
check_ports $sb_dir $required_ports

sleep 3
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Using a fixed sleep can make tests flaky. If the system is under load, 3 seconds may not be enough for replication to catch up, causing the test to fail. Conversely, on a fast system, this adds an unnecessary delay.

A more robust solution would be to poll for the replication status. Since the test-scripting language doesn't seem to support loops, you could create a helper script (e.g., in shell) that waits for replication to be caught up.

For example, a wait-for-replication.sh script could be:

#!/bin/bash
SB_DIR=$1
TIMEOUT=30

for i in $(seq 1 $TIMEOUT); do
    # This command will return a non-empty string if any channel has a non-zero or NULL lag.
    LAGGING_CHANNELS=$($SB_DIR/n3 -e "SHOW SLAVE STATUS\G" | grep 'Seconds_Behind_Master:' | grep -v ': 0$')

    if [ -z "$LAGGING_CHANNELS" ]; then
        echo "Replication caught up."
        exit 0
    fi
    sleep 1
done

echo "Timeout waiting for replication to catch up."
exit 1

Then you could call this script from the test template instead of using sleep. This would make the test more reliable and efficient.

exec $HOME/sandboxes/fan_in_msb_{{.DbPathVer}}/test_replication
stdout '# fail: 0'
! stderr .
Expand Down
Loading