Skip to content

Tests: Don't assume the checkout directory is named gutenberg (wp/5.6) - #85709

Merged
desrosj merged 2 commits into
wp/5.6from
fix/checkout-directory-name-wp-5.6
Oct 27, 2026
Merged

desrosj merged 2 commits into
wp/5.6from
fix/checkout-directory-name-wp-5.6

Conversation

@desrosj

@desrosj desrosj commented Oct 27, 2026

Copy link
Copy Markdown
Member

What?

Removes assumptions that the repository is checked out into a directory named gutenberg on the wp/5.6 branch. One commit per file:

  • Env: Don't add duplicate volumes to the generated docker-compose.yml file.
  • Env: Mount the plugin at wp-content/plugins/gutenberg in the tests environment.

Why?

The PHP unit test commands on this branch use the hardcoded path /var/www/html/wp-content/plugins/gutenberg, but wp-env mounts the plugin under the name of the directory the repository was checked out into. In a checkout with any other name, every PHPUnit job fails before running a test:

Could not read "/var/www/html/wp-content/plugins/gutenberg/phpunit/multisite.xml".

This backports #39362, which fixed this on trunk in 2022 and is already present on wp/6.0 and later: wp-content/plugins/gutenberg is mapped to the repository root, and wp-env no longer adds duplicate volumes when that mapping and the plugin resolve to the same path (which is the case in a checkout named gutenberg).

This can be encountered in environments that check the repository out under a different directory name, such as private forks.

Testing Instructions

  1. Clone the repository into a directory that is not named gutenberg.
  2. npm ci && npm run build && npm run wp-env start.
  3. Run npm run test-unit-php (and npm run test-unit-php-multisite). PHPUnit should find its configuration and run.
  4. In a checkout named gutenberg, npm run wp-env start should still start without docker-compose reporting a duplicate volume.

🤖 Generated with Claude Code

xknown and others added 2 commits October 27, 2026 00:16
…file.

docker-compose fails to start if a volume is listed more than once. That
happens when a directory mapping and a plugin source resolve to the same
path, such as mapping `wp-content/plugins/gutenberg` to `.` while `.` is
also loaded as a plugin from a checkout named `gutenberg`.

Backports the `packages/env` part of #39362.

(cherry picked from commit 936ce3a)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…environment.

The PHP unit test commands use the hardcoded path
`/var/www/html/wp-content/plugins/gutenberg`, but wp-env mounts the plugin
under the name of the directory it was checked out into. In a checkout with
any other name, PHPUnit fails with:

    Could not read "/var/www/html/wp-content/plugins/gutenberg/phpunit.xml.dist".

Map `wp-content/plugins/gutenberg` to the repository root so the path always
exists.

Backports the `.wp-env.json` part of #39362.

(cherry picked from commit 936ce3a)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@desrosj desrosj self-assigned this Oct 27, 2026
@coderabbitai

coderabbitai Bot commented Oct 27, 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: 138a6920-e0bd-4f3d-ac59-23b4720c8f78

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 added the [Tool] Env /packages/env label Oct 27, 2026
@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.

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: xknown <xknown@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.

@github-actions

Copy link
Copy Markdown

🤖 PR meta 🤖

🏷️ Labels

This pull request needs exactly one label indicating its type, and has 0.

  • Required: any label starting with [Type].
  • Found: none.

Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you.

@github-actions

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 1.2 MB

ℹ️ View Unchanged
Filename Size
build/a11y/index.js 1.14 kB
build/annotations/index.js 3.52 kB
build/api-fetch/index.js 3.33 kB
build/autop/index.js 2.75 kB
build/blob/index.js 670 B
build/block-directory/index.js 8.6 kB
build/block-directory/style-rtl.css 932 B
build/block-directory/style.css 933 B
build/block-editor/index.js 130 kB
build/block-editor/style-rtl.css 11 kB
build/block-editor/style.css 11 kB
build/block-library/editor-rtl.css 8.95 kB
build/block-library/editor.css 8.95 kB
build/block-library/index.js 144 kB
build/block-library/style-rtl.css 7.71 kB
build/block-library/style.css 7.7 kB
build/block-library/theme-rtl.css 737 B
build/block-library/theme.css 738 B
build/block-serialization-default-parser/index.js 1.78 kB
build/block-serialization-spec-parser/index.js 3.1 kB
build/blocks/index.js 47.8 kB
build/components/index.js 171 kB
build/components/style-rtl.css 15.4 kB
build/components/style.css 15.3 kB
build/compose/index.js 9.63 kB
build/core-data/index.js 12.1 kB
build/data-controls/index.js 681 B
build/data/index.js 8.6 kB
build/date/index.js 32.1 kB
build/deprecated/index.js 775 B
build/dom-ready/index.js 569 B
build/dom/index.js 4.54 kB
build/edit-navigation/index.js 10.6 kB
build/edit-navigation/style-rtl.css 868 B
build/edit-navigation/style.css 867 B
build/edit-post/index.js 306 kB
build/edit-post/style-rtl.css 6.38 kB
build/edit-post/style.css 6.37 kB
build/edit-site/index.js 21.7 kB
build/edit-site/style-rtl.css 3.81 kB
build/edit-site/style.css 3.82 kB
build/edit-widgets/index.js 26.7 kB
build/edit-widgets/style-rtl.css 3.09 kB
build/edit-widgets/style.css 3.09 kB
build/editor/editor-styles-rtl.css 483 B
build/editor/editor-styles.css 484 B
build/editor/index.js 42.8 kB
build/editor/style-rtl.css 3.82 kB
build/editor/style.css 3.82 kB
build/element/index.js 4.44 kB
build/escape-html/index.js 734 B
build/format-library/index.js 7.52 kB
build/format-library/style-rtl.css 548 B
build/format-library/style.css 549 B
build/hooks/index.js 1.75 kB
build/html-entities/index.js 623 B
build/i18n/index.js 3.55 kB
build/is-shallow-equal/index.js 712 B
build/keyboard-shortcuts/index.js 2.38 kB
build/keycodes/index.js 1.85 kB
build/list-reusable-blocks/index.js 3 kB
build/list-reusable-blocks/style-rtl.css 473 B
build/list-reusable-blocks/style.css 473 B
build/media-utils/index.js 5.13 kB
build/notices/index.js 1.69 kB
build/nux/index.js 3.26 kB
build/nux/style-rtl.css 672 B
build/nux/style.css 669 B
build/plugins/index.js 2.44 kB
build/primitives/index.js 1.35 kB
build/priority-queue/index.js 788 B
build/redux-routine/index.js 2.85 kB
build/reusable-blocks/index.js 3.06 kB
build/rich-text/index.js 13.2 kB
build/server-side-render/index.js 2.59 kB
build/shortcode/index.js 1.71 kB
build/token-list/index.js 1.23 kB
build/url/index.js 4.07 kB
build/viewport/index.js 1.74 kB
build/warning/index.js 1.13 kB
build/wordcount/index.js 1.23 kB

compressed-size-action

@desrosj
desrosj merged commit 6bdebb0 into wp/5.6 Oct 27, 2026
28 checks passed
@desrosj
desrosj deleted the fix/checkout-directory-name-wp-5.6 branch October 27, 2026 10:13
@desrosj desrosj added the [Type] Build Tooling Issues or PRs related to build tooling label Oct 27, 2026
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.

3 participants