Repository navigation
Repair wp/5.5 branch Actions: Replace wp-env's database check with a MariaDB health check - #85010
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.14 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:
|
e46fd8b to
f33ec72
Compare
f33ec72 to
42868db
Compare
Part of #82938.
What?
Ports #75046 ("wp-env: Fix MySQL startup race condition causing database connection errors") to this branch's
wp-env:mysqlandtests-mysqlservices get a health check, andwordpress/tests-wordpresswait for it withcondition: service_healthy.MARIADB_AUTO_UPGRADEis set so existing databases get the user the check needs.wp-env startno longer runswp db checkwith its retry loop and extra sleep.wp-env startisn't affected.Why?
wp db checkruns the MariaDB client in thewordpress:cliimage (11.8), which requires TLS, and WP-CLI passes--no-defaults, so it can't be turned off. MariaDB before 11.4 doesn't offer TLS by default, so with the10.5pin from #85011 (directly above)wp-env startwould stop withTLS/SSL error: SSL is required, but the server does not support it. Trunk droppedwp db checkfor a health check that doesn't use the client at all.How?
depends_on,startandcleanfollow #75046 hunk for hunk, adapted to this branch's files. The health check itself is #83751's, because runninghealthcheck.shunconditionally fails on some versionsWP_ENV_MARIADB_VERSION(#85008) can select: 10.2 and 10.3 lack the healthcheck user, and images from before 2022 (and old patch tags like10.5.8) lack the script. It runshealthcheck.shonly when both the script and.my-healthcheck.cnfexist, and otherwise pings over TCP on127.0.0.1withmariadb-adminormysqladmin.Testing
wp-envtests are ported;npm run test-unit -- packages/envpasses all 40 locally.mariadb:10.5throughhealthcheck.shand onmariadb:10.3through 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