Skip to content

Commit a6a2af1

Browse files
authored
Bump mariadb CI images + mysql unpin (#2739)
With MariaDB 10.3 EOL it seems prudent to include the latest 10.11 LTS release in the CI tests. To catch #1664 sort of issues prior to release, add a container image test for mariadb that contains the finished pre-release code changes (and container changes) to ensure that compatibilty is maintianed. When server code hits the branch associated with this tag it is considered finished by its server developers and has passes CI so no regressions are expected, but it wouldn't hurt to have CI in other systems testing it too. Since MySQL has fixed the regression that caused #1664 this puts it back to their 8.0 release tag. Append the :z tag to the docker compose volume mounts so on selinux systems enough permissions occur for the volume to be able to read the volume contents.
1 parent 745486b commit a6a2af1

File tree

3 files changed

+65
-42
lines changed

3 files changed

+65
-42
lines changed

.github/workflows/sqlx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ jobs:
467467
runs-on: ubuntu-20.04
468468
strategy:
469469
matrix:
470-
mariadb: [10_6, 10_3]
470+
mariadb: [verylatest, 10_11, 10_4]
471471
runtime: [async-std, tokio]
472472
tls: [native-tls, rustls, none]
473473
needs: check

tests/docker-compose.yml

Lines changed: 63 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ services:
77
#
88

99
mysql_8:
10-
# FIXME: 8.0.28 introduced a regression in our type tests: https://github.com/launchbadge/sqlx/issues/1664
11-
# The MySQL devs agreed that it was a regression and that it will be fixed in 8.0.29
12-
image: mysql:8.0.27
10+
image: mysql:8.0
1311
volumes:
14-
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
12+
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
1513
ports:
1614
- 3306
1715
environment:
@@ -24,9 +22,9 @@ services:
2422
context: .
2523
dockerfile: mysql/Dockerfile
2624
args:
27-
IMAGE: mysql:8.0.27
25+
IMAGE: mysql:8.0
2826
volumes:
29-
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
27+
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
3028
ports:
3129
- 3306
3230
environment:
@@ -37,7 +35,7 @@ services:
3735
mysql_5_7:
3836
image: mysql:5.7
3937
volumes:
40-
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
38+
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
4139
ports:
4240
- 3306
4341
environment:
@@ -52,7 +50,7 @@ services:
5250
args:
5351
IMAGE: mysql:5.7
5452
volumes:
55-
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
53+
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
5654
ports:
5755
- 3306
5856
environment:
@@ -61,19 +59,43 @@ services:
6159
MYSQL_ALLOW_EMPTY_PASSWORD: 1
6260

6361
#
64-
# MariaDB 10.6, 10.5, 10.4, 10.3
62+
# MariaDB 10.11, 10.6, 10.5, 10.4
6563
# https://mariadb.org/about/#maintenance-policy
6664
#
6765

66+
mariadb_10_11:
67+
image: mariadb:10.11
68+
volumes:
69+
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
70+
ports:
71+
- 3306
72+
environment:
73+
MARIADB_ROOT_PASSWORD: password
74+
MARIADB_DATABASE: sqlx
75+
76+
mariadb_10_11_client_ssl:
77+
build:
78+
context: .
79+
dockerfile: mysql/Dockerfile
80+
args:
81+
IMAGE: mariadb:10.11
82+
volumes:
83+
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
84+
ports:
85+
- 3306
86+
environment:
87+
MARIADB_DATABASE: sqlx
88+
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 1
89+
6890
mariadb_10_6:
6991
image: mariadb:10.6
7092
volumes:
71-
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
93+
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
7294
ports:
7395
- 3306
7496
environment:
75-
MYSQL_ROOT_PASSWORD: password
76-
MYSQL_DATABASE: sqlx
97+
MARIADB_ROOT_PASSWORD: password
98+
MARIADB_DATABASE: sqlx
7799

78100
mariadb_10_6_client_ssl:
79101
build:
@@ -82,7 +104,7 @@ services:
82104
args:
83105
IMAGE: mariadb:10.6
84106
volumes:
85-
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
107+
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
86108
ports:
87109
- 3306
88110
environment:
@@ -92,12 +114,12 @@ services:
92114
mariadb_10_5:
93115
image: mariadb:10.5
94116
volumes:
95-
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
117+
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
96118
ports:
97119
- 3306
98120
environment:
99-
MYSQL_ROOT_PASSWORD: password
100-
MYSQL_DATABASE: sqlx
121+
MARIADB_ROOT_PASSWORD: password
122+
MARIADB_DATABASE: sqlx
101123

102124
mariadb_10_5_client_ssl:
103125
build:
@@ -106,7 +128,7 @@ services:
106128
args:
107129
IMAGE: mariadb:10.5
108130
volumes:
109-
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
131+
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
110132
ports:
111133
- 3306
112134
environment:
@@ -116,12 +138,12 @@ services:
116138
mariadb_10_4:
117139
image: mariadb:10.4
118140
volumes:
119-
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
141+
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
120142
ports:
121143
- 3306
122144
environment:
123-
MYSQL_ROOT_PASSWORD: password
124-
MYSQL_DATABASE: sqlx
145+
MARIADB_ROOT_PASSWORD: password
146+
MARIADB_DATABASE: sqlx
125147

126148
mariadb_10_4_client_ssl:
127149
build:
@@ -130,37 +152,38 @@ services:
130152
args:
131153
IMAGE: mariadb:10.4
132154
volumes:
133-
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
155+
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
134156
ports:
135157
- 3306
136158
environment:
137159
MARIADB_DATABASE: sqlx
138160
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 1
139161

140-
mariadb_10_3:
141-
image: mariadb:10.3
162+
# Ensure MariaDB upstream isn't regressing before release
163+
# https://mariadb.org/new-service-quay-io-mariadb-foundation-mariadb-devel/
164+
mariadb_verylatest:
165+
image: quay.io/mariadb-foundation/mariadb-devel:verylatest
142166
volumes:
143-
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
167+
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
144168
ports:
145169
- 3306
146170
environment:
147-
MYSQL_ROOT_PASSWORD: password
148-
MYSQL_DATABASE: sqlx
171+
MARIADB_ROOT_PASSWORD: password
172+
MARIADB_DATABASE: sqlx
149173

150-
mariadb_10_3_client_ssl:
174+
mariadb_verylatest_client_ssl:
151175
build:
152176
context: .
153177
dockerfile: mysql/Dockerfile
154178
args:
155-
IMAGE: mariadb:10.3
179+
IMAGE: quay.io/mariadb-foundation/mariadb-devel:verylatest
156180
volumes:
157-
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
181+
- "./mysql/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
158182
ports:
159183
- 3306
160184
environment:
161185
MARIADB_DATABASE: sqlx
162186
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 1
163-
164187
#
165188
# PostgreSQL 15.x, 14.x, 13.x, 12.x, 11.x
166189
# https://www.postgresql.org/support/versioning/
@@ -181,7 +204,7 @@ services:
181204
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
182205
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
183206
volumes:
184-
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
207+
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
185208
# Loading `pg_stat_statements` should serve as a regression test for:
186209
# https://github.com/launchbadge/sqlx/issues/2622
187210
command: >
@@ -200,7 +223,7 @@ services:
200223
POSTGRES_HOST_AUTH_METHOD: trust
201224
POSTGRES_INITDB_ARGS: --auth-host=trust
202225
volumes:
203-
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
226+
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
204227
command: >
205228
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key -c ssl_ca_file=/var/lib/postgresql/ca.crt -c hba_file=/var/lib/postgresql/pg_hba.conf
206229
@@ -219,7 +242,7 @@ services:
219242
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
220243
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
221244
volumes:
222-
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
245+
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
223246
command: >
224247
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
225248
@@ -236,7 +259,7 @@ services:
236259
POSTGRES_HOST_AUTH_METHOD: trust
237260
POSTGRES_INITDB_ARGS: --auth-host=trust
238261
volumes:
239-
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
262+
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
240263
command: >
241264
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key -c ssl_ca_file=/var/lib/postgresql/ca.crt -c hba_file=/var/lib/postgresql/pg_hba.conf
242265
@@ -255,7 +278,7 @@ services:
255278
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
256279
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
257280
volumes:
258-
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
281+
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
259282
command: >
260283
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
261284
@@ -272,7 +295,7 @@ services:
272295
POSTGRES_HOST_AUTH_METHOD: trust
273296
POSTGRES_INITDB_ARGS: --auth-host=trust
274297
volumes:
275-
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
298+
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
276299
command: >
277300
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key -c ssl_ca_file=/var/lib/postgresql/ca.crt -c hba_file=/var/lib/postgresql/pg_hba.conf
278301
@@ -291,7 +314,7 @@ services:
291314
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
292315
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
293316
volumes:
294-
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
317+
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
295318
command: >
296319
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
297320
@@ -308,7 +331,7 @@ services:
308331
POSTGRES_HOST_AUTH_METHOD: trust
309332
POSTGRES_INITDB_ARGS: --auth-host=trust
310333
volumes:
311-
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
334+
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
312335
command: >
313336
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key -c ssl_ca_file=/var/lib/postgresql/ca.crt -c hba_file=/var/lib/postgresql/pg_hba.conf
314337
@@ -327,7 +350,7 @@ services:
327350
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
328351
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
329352
volumes:
330-
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
353+
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
331354
command: >
332355
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
333356
@@ -344,6 +367,6 @@ services:
344367
POSTGRES_HOST_AUTH_METHOD: trust
345368
POSTGRES_INITDB_ARGS: --auth-host=trust
346369
volumes:
347-
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql"
370+
- "./postgres/setup.sql:/docker-entrypoint-initdb.d/setup.sql:z"
348371
command: >
349372
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key -c ssl_ca_file=/var/lib/postgresql/ca.crt -c hba_file=/var/lib/postgresql/pg_hba.conf

tests/x.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def run(command, comment=None, env=None, service=None, tag=None, args=None, data
222222
# mariadb
223223
#
224224

225-
for version in ["10_6", "10_5", "10_4", "10_3"]:
225+
for version in ["verylatest", "10_11", "10_6", "10_5", "10_4"]:
226226
run(
227227
f"cargo test --no-default-features --features any,mysql,macros,_unstable-all-types,runtime-{runtime},tls-{tls}",
228228
comment=f"test mariadb {version}",

0 commit comments

Comments
 (0)