Repository navigation
Repair wp/5.9 branch Actions: Replace wp-env's database check with a MariaDB health check - #84412
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 ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Size Change: 0 B Total Size: 1.11 MB ℹ️ View Unchanged
|
51f0f2f to
b82d76b
Compare
|
Size Change: 0 B Total Size: 1.11 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. You can also manually ask me to refresh this list by adding the 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. |
edd768b to
56bbcfa
Compare
56bbcfa to
57fa973
Compare
Part of #82934.
What?
Ports #75046 to this branch's
wp-env: it waits for MariaDB with a Docker health check instead ofwp db check.mysqlandtests-mysqlget a health check, andwordpress/tests-wordpressstart only once their database is healthy (condition: service_healthy).wp-env startno longer runswp db check(or its retry loop and extra sleep), and starts both databases together.wp-env cleanstarts only the database it resets.MARIADB_AUTO_UPGRADEis set so existing databases get the userhealthcheck.shneeds.wp dband MariaDB before 11.4 now sayswp-env startisn't affected.Why?
wp db checkrunsmariadb-checkfrom thewordpress:cliimage, whose MariaDB 11.8 client requires TLS, and WP-CLI passes--no-defaultsso that can't be turned off. MariaDB before 11.4 has no TLS by default, so the check fails withSSL is required, but the server does not support itandwp-env startstops. The next PR in this stack, #84411, pins MariaDB 10.6, so without this change every job that startswp-envwould fail.How?
The
depends_on,startandcleanchanges follow #75046, adapted to this branch's files. The health check comes from #83751 because #75046's unconditionalhealthcheck.shdoesn't work on every MariaDB versionwp-envcan select: 10.2 and 10.3 lack the healthcheck user, and pre-2022 images and old patch tags lack the script. It runshealthcheck.sh --connect --innodb_initializedwhen both the script and.my-healthcheck.cnfexist, and otherwise pings127.0.0.1over TCP withmariadb-adminormysqladmin, whichever the image has. 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.#75046's compose tests and #83751's health check tests are ported (the latter run the command against stub scripts, skipped on Windows;
replaceAllbecame.split().join()for Node 14).Verified locally:
wp-env startwith MariaDB 10.6 brings both databases up healthy and installs WordPress in both environments. Withmariadb:10.3, both become healthy 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.