Skip to content

Repair wp/5.5 branch Actions: Migrate wp-env to Docker Compose v2 - #84999

Open
desrosj wants to merge 2 commits into
fix-actions-5.5/upgrade-node-to-14from
fix-actions-5.5/docker-compose-v2
Open

desrosj wants to merge 2 commits into
fix-actions-5.5/upgrade-node-to-14from
fix-actions-5.5/docker-compose-v2

Conversation

@desrosj

@desrosj desrosj commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

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-env job (PHP in unit-test.yml, Admin - 1 to Admin - 4 in end2end-test.yml) fails with spawn docker-compose ENOENT: packages/env runs 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 start reaches the database and fails at wp db check:

mariadb-check: Got error: 1045: Access denied for user 'example username'@'172.18.0.5' (using password: YES) when trying to connect

example username is the wordpress image's placeholder default, used when WORDPRESS_DB_USER/WORDPRESS_DB_PASSWORD are unset. No service on this branch sets them, while the mysql service (MYSQL_ALLOW_EMPTY_PASSWORD: 'yes') only has root with an empty password. This isn't a v2 regression; the v1 ENOENT failure 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). Each require( 'docker-compose' ) uses the v2 export; run.js spawns docker with compose prepended instead of docker-compose; cli.js's error message and its test/cli.js assertion say "docker compose". The docker-compose npm package goes from ^0.22.2 to ^0.24.3 (the v2 export needs 0.23.0 or newer), the same range trunk and wp/5.7–wp/5.9 use. It resolves to 0.24.8, with yaml@2.9.1 nested under it in package-lock.json.
  • Set explicit `WORDPRESS_DB_USER`/`WORDPRESS_DB_PASSWORD` on every service that talks to the database.: adds WORDPRESS_DB_USER: 'root' and WORDPRESS_DB_PASSWORD: '' to the wordpress, tests-wordpress, cli, tests-cli and phpunit services. Each container reads wp-config.php with its own environment, so all of them need it.

The range stays below 1.0.0, which removed the v2 export. 0.24.1 and later depend on yaml@^2.2.2, which requires Node 14 (>=14.6 from 2.8); #84998, directly below, moves this branch to Node 14. Under Node 14.21.3 and npm 6.14.18, 0.24.8 loads and its v2 export has every method wp-env calls (down, exec, logs, rm, run, upMany, upOne). npm install --package-lock-only with that npm leaves no changes to the docker-compose or yaml entries.

With both commits, Install WordPress gets past ENOENT and Access 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), the caniuse-lite is outdated warning in the JavaScript job (#85006), and lockfile drift in the puppeteer alias that check-local-changes flags (#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.

@desrosj desrosj added [Type] Build Tooling Issues or PRs related to build tooling [Tool] Env /packages/env labels Oct 16, 2026
@desrosj desrosj self-assigned this Oct 16, 2026
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 18f8a442-ad51-4d8b-bed4-93a21e7793d7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: desrosj <desrosj@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@adimoldovan
adimoldovan self-requested a review October 22, 2026 11:04

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Tool] Env /packages/env [Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants