Repository navigation
Repair wp/5.6 branch Actions: Add a WP_ENV_MARIADB_VERSION environment variable - #84970
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.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. 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. |
e888a10 to
d6532eb
Compare
d6532eb to
14fe050
Compare
Part of #82937.
What?
Adds a
WP_ENV_MARIADB_VERSIONenvironment variable that chooses the MariaDB versionwp-envuses. The database image inpackages/env/lib/build-docker-compose-config.jschanges from'mariadb'to'mariadb:${WP_ENV_MARIADB_VERSION:-latest}'. When the variable isn't set, the image resolves tomariadb:latest, the same image as before.The README gets a note next to the existing port-variable note. Besides the variable, it says that MariaDB cannot start on a database written by a newer version, so before switching to a lower version, run
wp-env destroy, which removes the environment's Docker containers, volumes, networks, and local files, not only the database. It also says that with a version older than 11.4,wp dbcommands in thecliandtests-clicontainers fail andwp-env cleanleaves the database as it is: the MariaDB client in thewordpress:cliimage requires TLS, and MariaDB servers before 11.4 do not offer it. WordPress itself is not affected.packages/env/CHANGELOG.mdgets an entry under Unreleased → New Features.Why?
This branch's
wp-env(2.1.0) always runs the floatingmariadbimage, which today is a MariaDB release many years newer than anything this branch was tested against. There is currently no way to pin an older, era-appropriate version for testing.How?
This follows #83751, which adds a
mariadbVersionoption andWP_ENV_MARIADB_VERSIONenvironment variable totrunk.wp-env2.1.0 has no version settings to extend, so only the environment variable is ported. Docker Compose fills it in when it reads the generateddocker-compose.yml, the same way this file already usesWP_ENV_PORT/WP_ENV_TESTS_PORTin the port mappings andLOCAL_PHPin thephpunitimage.This branch's
wp-envruns onemysqlservice for both the development and tests environments, so a single image line changes.A new test in
packages/env/test/build-docker-compose-config.jschecks the generated image string.Pinning the version doesn't by itself fix the
mariadb-checkTLS error thatwp-env startcan hit on this branch; #84972, later in this stack, replaces that check with a health check.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.