Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Put CI MySQL/MariaDB datadirs on tmpfs (#79226)

dpsutton6fcdf94fa53b
diff --git a/.github/actions/cross-branch-migration-test/action.yml b/.github/actions/cross-branch-migration-test/action.yml
index 6c6186ea0fd..f938e8cdb56 100644
--- a/.github/actions/cross-branch-migration-test/action.yml
+++ b/.github/actions/cross-branch-migration-test/action.yml
@@ -1,4 +1,7 @@
name: Cross-branch migration test
+description: >-
+ Boot Metabase on the base branch to migrate the app db, then boot the PR branch against the
+ same db, verifying the PR's migrations apply cleanly on top of the base branch's schema.
inputs:
base-ref: ## Base branch PR came from
diff --git a/.github/workflows/app-db.yml b/.github/workflows/app-db.yml
index 439362102aa..aec33e4f4fa 100644
--- a/.github/workflows/app-db.yml
+++ b/.github/workflows/app-db.yml
@@ -61,6 +61,9 @@ jobs:
services:
mysql:
image: ${{ matrix.version.image }}
+ # disposable CI database: a RAM-backed datadir makes the ~90k fsyncs of a full
+ # migration chain free (measured: setup-db! 59s -> 16s)
+ options: --tmpfs /var/lib/mysql:rw
ports:
- "3306:3306"
env:
@@ -185,6 +188,9 @@ jobs:
services:
mysql:
image: ${{ matrix.version.image }}
+ # disposable CI database: a RAM-backed datadir makes the ~90k fsyncs of a full
+ # migration chain free (measured: setup-db! 59s -> 16s)
+ options: --tmpfs /var/lib/mysql:rw
ports:
- "3306:3306"
env:
diff --git a/.github/workflows/cross-branch-migrations.yml b/.github/workflows/cross-branch-migrations.yml
index 1bd9079f077..4b245686358 100644
--- a/.github/workflows/cross-branch-migrations.yml
+++ b/.github/workflows/cross-branch-migrations.yml
@@ -103,6 +103,8 @@ jobs:
services:
mysql:
image: mysql:8.0
+ # disposable CI database: a RAM-backed datadir makes migration fsyncs free
+ options: --tmpfs /var/lib/mysql:rw
ports:
- "3306:3306"
env:
@@ -129,6 +131,8 @@ jobs:
services:
mysql:
image: mysql:9
+ # disposable CI database: a RAM-backed datadir makes migration fsyncs free
+ options: --tmpfs /var/lib/mysql:rw
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_DATABASE: mb_test
@@ -183,6 +187,8 @@ jobs:
services:
mariadb:
image: metabase/mariadb:10.6 # https://github.com/metabase/metabase-mariadb-docker-image
+ # disposable CI database: a RAM-backed datadir makes migration fsyncs free
+ options: --tmpfs /var/lib/mysql:rw
ports:
- "3306:3306"
env:
@@ -208,6 +214,8 @@ jobs:
services:
mariadb:
image: mariadb:latest
+ # disposable CI database: a RAM-backed datadir makes migration fsyncs free
+ options: --tmpfs /var/lib/mysql:rw
ports:
- "3306:3306"
env:
diff --git a/.github/workflows/drivers.yml b/.github/workflows/drivers.yml
index 10418089891..2fb4e98f82d 100644
--- a/.github/workflows/drivers.yml
+++ b/.github/workflows/drivers.yml
@@ -680,6 +680,8 @@ jobs:
services:
mysql:
image: ${{ matrix.version.image }}
+ # disposable CI database: a RAM-backed datadir makes DDL/insert fsyncs free
+ options: --tmpfs /var/lib/mysql:rw
ports:
- "3306:3306"
env:
diff --git a/.github/workflows/semantic-search.yml b/.github/workflows/semantic-search.yml
index 85053d4433b..73331685871 100644
--- a/.github/workflows/semantic-search.yml
+++ b/.github/workflows/semantic-search.yml
@@ -107,6 +107,8 @@ jobs:
POSTGRES_PASSWORD: postgres
mysql:
image: ${{ matrix.version.mariadb-image }}
+ # disposable CI database: a RAM-backed datadir makes DDL/insert fsyncs free
+ options: --tmpfs /var/lib/mysql:rw
ports:
- "3306:3306"
env:
@@ -187,6 +189,8 @@ jobs:
POSTGRES_PASSWORD: postgres
mysql:
image: ${{ matrix.version.mysql-image }}
+ # disposable CI database: a RAM-backed datadir makes DDL/insert fsyncs free
+ options: --tmpfs /var/lib/mysql:rw
ports:
- "3306:3306"
env: