Repository navigation
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.33 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. |
8d7b1c9 to
fd95069
Compare
fd95069 to
bcfa9fa
Compare
|
Size Change: 0 B Total Size: 1.33 MB ℹ️ View Unchanged
|
Part of #82931.
What?
Adds a
mariadbVersionoption to.wp-env.jsonand aWP_ENV_MARIADB_VERSIONenvironment variable, so the MariaDB versionwp-envuses can be chosen.env.development,env.tests), likephpVersion.WP_ENV_MARIADB_VERSIONoverrides both environments."lts","latest", or a numeric version such as"10.11"or"11.4.2". Anything else fails with a validation error, including an invalidWP_ENV_MARIADB_VERSIONvalue.mariadb, exactly as before. A set version becomesmariadb:<version>on themysqlandtests-mysqlservices.The README gets a table row and a "Specific MariaDB Version" section, and
packages/env/CHANGELOG.mdgets an entry under Unreleased.The README section also says:
wp-env destroy. It removes the environment's Docker containers, volumes, networks, and local files, not only the databases.mariadbVersionolder than 11.4,wp dbcommands in theclicontainers fail andwp-env cleanleaves the database as it is. The MariaDB client in the CLI image requires TLS whenphpVersionis unset or 8.1 or newer, and MariaDB servers before 11.4 do not offer it. WordPress itself is not affected.DOCKER_DEFAULT_PLATFORM=linux/amd64, which emulates every container in the environment, not only the database.Why?
This branch's
wp-env(5.11.2) 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 the same option and environment variable to
trunk. This branch'swp-envkeeps its configuration inpackages/env/lib/config/config.js, so the change follows howphpVersionworks there:validateConfig()checks the value (the newcheckMariaDBVersion()).parse-config.jspasses it through.config.jsadds the default and appliesWP_ENV_MARIADB_VERSION. UnlikeWP_ENV_PHP_VERSION, the new variable is validated.build-docker-compose-config.jssets each environment's image.New tests in
packages/env/lib/config/test/config.jscover the default, root and per-environment values, the environment-variable override, and both validation errors. New tests inpackages/env/test/build-docker-compose-config.jscover the image with and without a version. The config snapshot gains"mariadbVersion": null.With
"mariadbVersion": "10.11",wp-env start'swp db checkfails because the CLI image's client requires TLS; #84235, 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.