Repository navigation
Repair wp/6.2 branch Actions: Replace wp-env's database check with a MariaDB health check - #84235
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
Size Change: 0 B Total Size: 1.33 MB ℹ️ View Unchanged
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
d34d4d2 to
c05f8a5
Compare
c05f8a5 to
3938546
Compare
|
Size Change: 0 B Total Size: 1.33 MB ℹ️ View Unchanged
|
3938546 to
24cdf10
Compare
Part of #82931.
What?
Ports #75046 to this branch's
wp-env: Docker Compose now waits for MariaDB with a health check instead ofwp-env startrunningwp db check.mysqlandtests-mysqlget a health check, andwordpressandtests-wordpresswait for it (condition: service_healthy).wp-env startno longer runswp db checkor its retry loop and sleep.wp-env cleanonly starts the database it resets.wp dbcommands on MariaDB before 11.4 sayswp-env startisn't affected.Why?
wp db checkrunsmariadb-checkfrom thewordpress:cliimage (MariaDB 11.8), which requires TLS by default. MariaDB releases before 11.4 don't provide TLS unless configured, so the check fails withSSL is required, but the server does not support it. The next PR in this stack, #84234, pins MariaDB 10.11, so without this changewp-env startwould fail in every job.How?
The health check command comes from #83751 rather than #75046, so it works with every MariaDB version
wp-envcan select: it runshealthcheck.sh --connect --innodb_initializedwhen the image and data volume support it, and otherwise pings the server over TCP withmariadb-adminormysqladmin.MARIADB_AUTO_UPGRADEcreates the userhealthcheck.shneeds on existing databases. Unlikewp/6.3and newer, this branch'swp-envuses the stockwordpress:cliimage without a generated Dockerfile, so #83751's client wrappers can't be added;wp dbcommands still fail below 11.4, as the README notes.The tests from both PRs are ported (with
.split().join()in place ofreplaceAll, which Node 14 lacks). Verified locally:wp-env startsucceeds with MariaDB 10.11, and with 10.3 through the ping fallback.Use of AI Tools
This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.