Repository navigation
Conversation
…vice that talks to the database.
|
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. |
Part of #82938.
What?
Migrates
wp-env(packages/env) from Docker Compose v1 to v2, and fixes the database credentials mismatch the migration exposes.Why?
Every
wp-envjob (PHPinunit-test.yml,Admin - 1toAdmin - 4inend2end-test.yml) fails withspawn docker-compose ENOENT:packages/envruns the standalone Docker Compose v1 binary, which GitHub's runner images no longer ship. Trunk fixed the same problem in #51339 (a0943f2, December 2023).With that fixed,
wp-env startreaches the database and fails atwp db check:example usernameis thewordpressimage's placeholder default, used whenWORDPRESS_DB_USER/WORDPRESS_DB_PASSWORDare unset. No service on this branch sets them, while themysqlservice (MYSQL_ALLOW_EMPTY_PASSWORD: 'yes') only hasrootwith an empty password. This isn't a v2 regression; the v1ENOENTfailure hid it.How?
Migrate `wp-env` from Docker Compose v1 to v2.: adapts trunk's commit to this branch's files (lib/commands/{clean,destroy,logs,run,start,stop}.js,lib/wordpress.js,lib/cli.js). Eachrequire( 'docker-compose' )uses thev2export;run.jsspawnsdockerwithcomposeprepended instead ofdocker-compose;cli.js's error message and itstest/cli.jsassertion say "docker compose". Thedocker-composenpm package goes from^0.22.2to^0.24.3(thev2export needs0.23.0or newer), the same range trunk andwp/5.7–wp/5.9use. It resolves to0.24.8, withyaml@2.9.1nested under it inpackage-lock.json.Set explicit `WORDPRESS_DB_USER`/`WORDPRESS_DB_PASSWORD` on every service that talks to the database.: addsWORDPRESS_DB_USER: 'root'andWORDPRESS_DB_PASSWORD: ''to thewordpress,tests-wordpress,cli,tests-cliandphpunitservices. Each container readswp-config.phpwith its own environment, so all of them need it.The range stays below
1.0.0, which removed thev2export.0.24.1and later depend onyaml@^2.2.2, which requires Node 14 (>=14.6from2.8); #84998, directly below, moves this branch to Node 14. Under Node14.21.3and npm6.14.18,0.24.8loads and itsv2export has every methodwp-envcalls (down,exec,logs,rm,run,upMany,upOne).npm install --package-lock-onlywith that npm leaves no changes to thedocker-composeoryamlentries.With both commits,
Install WordPressgets pastENOENTandAccess denied(checked on this fix's earlier unstacked PR, desrosj#289). At this point in the stack, CI still fails on problems later PRs fix:wp db check's MariaDB TLS error (self-signed certificate, #85010), thecaniuse-lite is outdatedwarning in theJavaScriptjob (#85006), and lockfile drift in thepuppeteeralias thatcheck-local-changesflags (#85001).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.