Repository navigation
Repair wp/5.7 branch Actions: Replace wp-env's database check with a MariaDB health check - #84784
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 |
|
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. |
ee1e281 to
85852fe
Compare
85852fe to
9841c38
Compare
9841c38 to
48c57e5
Compare
Part of #82936.
What?
Ports #75046 to this branch's
wp-env. The database services get a health check, WordPress waits for it withcondition: service_healthy, and thewp db checkretry loop is removed fromwp-env start. The CHANGELOG and README are updated to match.Why?
wp db checkuses the MariaDB client in thewordpress:cliimage. That client requires TLS, which MariaDB servers before 11.4 don't offer, sowp-env startfails withSSL is required, but the server does not support it. The next PR, #84785, pins MariaDB10.5, so without this change every job that startswp-envwould fail. The health check doesn't use the MySQL client at all.How?
The
depends_on,startandcleanchanges follow #75046, adapted to this branch's file layout.The health check command comes from #83751, because #75046's version doesn't work on every MariaDB version. It runs
healthcheck.shonly when the image has the script and the data directory has its user config. Otherwise it pings the server over TCP withmariadb-adminormysqladmin, whichever the image ships. 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, using
.split().join()in place ofreplaceAll, which Node 14 doesn't have. Verified locally: both databases become healthy onmariadb:10.5(throughhealthcheck.sh) and onmariadb: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.
🤖 Generated with Claude Code