fleet/tools/percona/test/upgrade.sh
Ian Littman 7d4acdc5c4
Bump supported MySQL versions (#40892)
Fixes #40975.

8.0.32 (was running in Aurora managed cloud at the time) -> 8.0.39 (what
we're running now) 8.0.36 -> 8.0.44 (latest 8.0.x version supported by
Aurora; holding off on 8.0.45 until Aurora supports it) 8.4.7 -> 8.4.8
9.5.0 -> 9.6.0

Also bumped the supported Aurora version from 3.07.0 to 3.08.2 to match
what we're running in managed cloud right now

Fleet might work on older patch versions but we'll no longer dev/test on
them. MySQL 9.x not testing previous minor versions matches with our
previous approach for that version.

Since these are all patch/minor bumps (and the overnight build cases are
patch bumps/are covered by AWS envs) automated testing should be
sufficient here.
2026-03-04 12:25:20 -06:00

42 lines
1.5 KiB
Bash
Executable file

#!/bin/bash
set -x
set -e
# Up to `fleet-v4.40.0` there are no migration issues with Percona Server XtraDB's `pxc_strict_mode=ENFORCING` default value.
# We introduced issues with `pxc_strict_mode=ENFORCING` in DB migrations in `fleet-v4.41.0` and in `fleet-v4.42.0`.
# Bring everything down.
docker compose down
docker volume rm fleet_mysql-persistent-volume
# Start dependencies using Percona XtraDB as MySQL server.
# NOTE: To troubleshoot, remove `>/dev/null`.
FLEET_MYSQL_IMAGE=percona/percona-xtradb-cluster:8.0.44 docker compose up >/dev/null 2>&1 &
export MYSQL_PWD=toor
until mysql --host 127.0.0.1 --port 3306 -uroot -e 'SELECT 1=1;' ; do
echo "Waiting for Percona XtraDB MySQL Server..."
sleep 10
done
echo "Percona XtraDB MySQL Server is up and running, continuing..."
# Checkout and build `fleet-4.42.0`.
git checkout fleet-v4.42.0
make generate && make fleet
# Set pxc_strict_mode=PERMISSIVE to run migrations up to fleet-v4.42.0,
# which was the last migration released with `pxc_strict_mode=ENFORCING` issues.
mysql --host 127.0.0.1 --port 3306 -uroot -e 'SET GLOBAL pxc_strict_mode=PERMISSIVE;'
# Run migrations up to fleet-v4.42.0.
make db-reset
# Set `pxc_strict_mode` back to the `ENFORCING` default.
mysql --host 127.0.0.1 --port 3306 -uroot -e 'SET GLOBAL pxc_strict_mode=ENFORCING;'
# Run migrations from fleet-v4.42.0 up to latest to catch any future bugs when running with `pxc_strict_mode=ENFORCING`.
git checkout main
make generate && make fleet
./build/fleet prepare db --dev --logging_debug