From 1c188ad440e82bb356832497c387aace71653dc8 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 30 Jan 2023 13:41:15 -0800 Subject: [PATCH] Test with MariaDB instead of MySQL I'm not sure if this is a good idea or not yet. Testing with MySQL actually exposed the alembic transaction thing that is fixed in a grandparent change. That said much of the world seems to be moving to MariaDB so it might be a good idea for us to test that more explicitly? We update bindep.txt which will install mariadb during CI job runs. We also update our local test setup tooling to roughly match what will be used in CI. For example the mariadb:10.6 docker image is chosen because this is roughly equivalent to what Jammy packages. Another good reason for this change is that Debian ARM64 does not package MySQL and only packages MariaDB. This should give us better compatibility for testing on architectures other than x86-64. Change-Id: I9d00557ca5823da34278c3e9ecda2daaf13440b7 --- bindep.txt | 4 ++-- tools/docker-compose.yaml | 6 +++--- tools/test-setup-docker.sh | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bindep.txt b/bindep.txt index 2e9c5e6962..04cf0c797d 100644 --- a/bindep.txt +++ b/bindep.txt @@ -1,9 +1,9 @@ # This is a cross-platform list tracking distribution packages needed by tests; # see http://docs.openstack.org/infra/bindep/ for additional information. -mysql-client [test !platform:rpm] +mariadb-client [test !platform:rpm] +mariadb-server [test] mysql [test platform:rpm] -mysql-server [test] postgresql [test] libjpeg-dev [test !platform:rpm] libjpeg-turbo-devel [test platform:rpm] diff --git a/tools/docker-compose.yaml b/tools/docker-compose.yaml index 05b4905e2e..743be69885 100644 --- a/tools/docker-compose.yaml +++ b/tools/docker-compose.yaml @@ -1,9 +1,9 @@ version: "3" services: - mysql: - container_name: zuul-test-mysql - image: mysql:8.0 + mariadb: + container_name: zuul-test-mariadb + image: mariadb:10.6 environment: - MYSQL_ROOT_PASSWORD=insecure_worker ports: diff --git a/tools/test-setup-docker.sh b/tools/test-setup-docker.sh index 1601b11a7f..6000230bbb 100755 --- a/tools/test-setup-docker.sh +++ b/tools/test-setup-docker.sh @@ -38,7 +38,7 @@ else fi -MYSQL="${DOCKER} exec zuul-test-mysql mysql -u root -pinsecure_worker" +MYSQL="${DOCKER} exec zuul-test-mariadb mysql -u root -pinsecure_worker" if [ "${COMPOSE}" == "docker-compose" ]; then ${ROOTCMD} docker-compose rm -sf