Repository navigation
Repair wp/5.6 branch Actions: Create the wp-env development and tests databases - #84971
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.2 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:
|
2e632f3 to
da99121
Compare
da99121 to
5d28baf
Compare
andrewserong
left a comment
There was a problem hiding this comment.
LGTM, and using a minimal form with an empty password allowed makes sense to me since this will likely only ever be used in CI 👍
5d28baf to
8e11716
Compare
Part of #82937.
What?
Creates the
wordpressandtests-wordpressdatabaseswp-envuses:mysqlsetsMYSQL_DATABASE: wordpress.tests-mysqlservice (samemariadb:${WP_ENV_MARIADB_VERSION:-latest}image, its ownmysql-testvolume) setsMYSQL_DATABASE: tests-wordpress.tests-wordpress,tests-cliandphpunitsetWORDPRESS_DB_HOST: tests-mysql;tests-cliandphpunitalso setWORDPRESS_DB_NAME: tests-wordpress.Why?
Nothing creates either database.
mysqlonly setsMYSQL_ALLOW_EMPTY_PASSWORD, and thewordpressimage's entrypoint stopped runningCREATE DATABASEfromWORDPRESS_DB_NAMEin January 2021 (docker-library/wordpress#557). So once #84972 removes thewp db checkthat fails first on TLS, "Install WordPress" fails withError: Can’t select database.The image's
wp-config.phpreads each database setting withgetenv_docker(), so every container uses its own environment. Reproduced locally with this branch'swp-envand current images: withoutWORDPRESS_DB_NAME,tests-cliandphpunitfall back towordpress, so the tests environment would be installed into the development database.cli's defaults (wordpressonmysql) are already right, so it's unchanged.How?
A minimal backport of the database part of #29800 (f8052e1), which
wp/5.7and later have. Differences:MYSQL_ALLOW_EMPTY_PASSWORD,WORDPRESS_DB_PASSWORD: '') instead ofMYSQL_ROOT_PASSWORD.makeConfigWritable: the entrypoint already makeswp-config.phpowned bywww-data, and everywp config setsucceeds without it.#84972 gives
tests-mysqlthe same health check asmysqland makestests-wordpresswait for it.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.