Open louiswol94 opened 3 months ago
+1
If anyone needs a temporary workaround, I updated the mariadb:lts
to mariadb:11.2.4-jammy
in my node_modules/@wordpress/env/lib/build-docker-compose-config.js
If you are running this on a CI script you can run sed -i -e "s/image: 'mariadb:lts'/image: 'mariadb:11.2.4-jammy'/g" node_modules/@wordpress/env/lib/build-docker-compose-config.js
right after npm ci
for example.
It works for now, until there is a fix from wp-env
or MariaDB's side.
This is something I've seen too, but it's very intermittent for me. I've only seen it once in my local environment, but it's the cause of a lot of test failures in this repo's CI. There's an example here - https://github.com/WordPress/gutenberg/actions/runs/10087381455/job/27891446096?pr=63918.
It'd be good if there was more error logging to know what the actual mariadb error is, that way it could be reported upstream.
If anyone needs a temporary workaround, I updated the mariadb:lts to mariadb:11.2.4-jammy in my node_modules/@wordpress/env/lib/build-docker-compose-config.js
That seems like a downgrade rather than an update, as LTS is 11.4.
Seems also related to https://github.com/WordPress/gutenberg/issues/59244 where the switch to the lts
version happened. It's quite annoying, so +1 on adding more logging, and potentially some retries/waiting for MySQL service to help with CI stability. We've been encountering this almost every other day.
Good spot, it does seem like a similar issue, though now only intermittent.
It does look like mariadb recently made 11.4 LTS (https://mariadb.org/11-4-lts/), and that seems to correlate with when the flakiness started. 🤔
In terms of better logging, I wonder if we can add the log files to the github action job artifacts when failing at the 'Install WordPress' stage.
Description
Hi there,
We are experiencing the following issue with
wp-env
:Error while running docker compose command. Container 389b8d981d610881ee022d53ce63130e-tests-mysql-1 Running Container 389b8d981d610881ee022d53ce63130e-tests-wordpress-1 Running Error: Error establishing a database connection. This either means that the username and password information in your
wp-config.php
file is incorrect or that contact with the database server attests-mysql
could not be established. This could mean your host’s database server is down.It is happening in more than one of our repositories at the moment.
I see a MariaDB version was released a few days ago. Maybe it is related: https://mariadb.org/mariadb/all-releases/
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes