Skip to content

Repair wp/5.4 branch Actions: Migrate wp-env to Docker Compose v2 - #85604

Merged
desrosj merged 2 commits into
fix-actions-5.4/upgrade-node-to-14from
fix-actions-5.4/docker-compose-v2
Oct 29, 2026
Merged

desrosj merged 2 commits into
fix-actions-5.4/upgrade-node-to-14from
fix-actions-5.4/docker-compose-v2

Conversation

@desrosj

@desrosj desrosj commented Oct 26, 2026

Copy link
Copy Markdown
Member

Part of #83419.

What?

Migrates wp-env (packages/env) from the Docker Compose v1 binary to Docker Compose v2, and gives every WordPress container explicit database credentials.

Why?

wp-env calls the standalone docker-compose v1 binary, which current Docker installs and CI runner images no longer include, so every wp-env command fails with spawn docker-compose ENOENT.

With that fixed, wp-env start reaches its database check for the first time and fails again: the WordPress and CLI containers fall back to the wordpress image's placeholder credentials, which don't match the mysql service.

How?

The same change as trunk's a0943f2 (#51339): switch to the docker-compose npm package's v2 export. On this branch every Compose call goes through one require() in lib/env.js, so that single change covers them all. The package is pinned to 0.24.0, the newest release with the v2 export whose own dependencies still run on the Node.js versions this branch has used. The database credentials are set on the four services that load wp-config.php, matching the mysql service's root user with an empty password.

Testing Instructions

packages/env's tests run in the JavaScript job on this pull request. The CI workflows on this branch use wordpress-develop's environment rather than wp-env, so this mainly fixes wp-env for local use.

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.

🤖 Generated with Claude Code

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

coderabbitai Bot commented Oct 26, 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
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4bf91b68-cea3-4cc6-9277-4f303fc0016a

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

github-actions Bot commented Oct 27, 2026 •

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.

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>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>

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


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@andrewserong andrewserong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@desrosj
desrosj force-pushed the fix-actions-5.4/docker-compose-v2 branch from 3df649f to f050801 Compare October 29, 2026 12:48
@desrosj
desrosj merged commit 4db9baf into wp/5.4 Oct 29, 2026
11 of 27 checks passed
@desrosj
desrosj deleted the fix-actions-5.4/docker-compose-v2 branch October 29, 2026 17:19
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