Make WordPress Core

Opened 5 weeks ago

Closed 3 weeks ago

#66040 closed enhancement (fixed)

Allow a workflow to specify the branch of `gutenberg` to use when testing the Gutenberg build script

Reported by: desrosj Owned by: desrosj
Priority: normal Milestone: 7.2
Component: Build/Test Tools Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

The reusable workflow checks out the Gutenberg repository and tests that the Gutenberg plugin build process is error free when run within a wordpress-develop checkout.

While this workflow is not run in trunk or numbered branches newer than 7.0 (see r64225), old branches still rely on it. As numbered branches in wordpress-develop get older, support for them is dropped upstream in the Gutenberg plugin. Continuing to test against the latest will eventually become problematic because the workflow will currently only ever use trunk.

Such a situation came up this week when Gutenberg was upgraded to use Node.js 24.x which no longer matches the 6.8 branch (​run log).

npm error code EBADENGINE
npm error engine Unsupported engine
npm error engine Not compatible with your version of node/npm: gutenberg@23.9.0
npm error notsup Not compatible with your version of node/npm: gutenberg@23.9.0
npm error notsup Required: {"node":">=24.18.0","npm":">=11.16.0"}
npm error notsup Actual:   {"npm":"10.8.2","node":"v20.20.2"}

For end to end tests, each numbered WordPress branch is updated to pin the last version of the Gutenberg plugin that supports that branch when support is dropped. A similar approach should be made possible for this workflow.

Change History (25)

This ticket was mentioned in ​PR #13381 on ​WordPress/wordpress-develop by ​@desrosj.


5 weeks ago
#1

  • Keywords has-patch added

This adds a new input for the reusable workflow responsible for testing the Gutenberg build script to allow branches to use a specific branch in the gutenberg repository.

This allows for a similar pattern to that used in the end to end testing workflow where a specific version of the Gutenberg plugin is pinned once support for the branch of WordPress running the workflow is dropped.

The motive for this change came about from ​this failed workflow run, which started failing after ​https://github.com/wordpress/gutenberg was updated to use Node.js version 24.x instead of 20.x, which is what the 6.8 branch uses.

Trac ticket: Core-66040.

## Use of AI Tools

None

#2 @desrosj
5 weeks ago

An example of how this looks in practice for the E2E testing workflow is r62544.

This ticket was mentioned in ​PR #13382 on ​WordPress/wordpress-develop by ​@desrosj.


5 weeks ago
#3

Pins the wp/6.8 branch in the gutenberg repository when testing the Gutenberg build scripts.

Trac ticket: Core-66040.

## Use of AI Tools

This ticket was mentioned in ​PR #13384 on ​WordPress/wordpress-develop by ​@desrosj.


5 weeks ago
#4

Pins the wp/6.5 branch in the gutenberg repository when testing the Gutenberg build scripts.

Trac ticket: Core-66040.

## Use of AI Tools

None

This ticket was mentioned in ​PR #13385 on ​WordPress/wordpress-develop by ​@desrosj.


5 weeks ago
#5

Pins the wp/6.6 branch in the gutenberg repository when testing the Gutenberg build scripts.

Trac ticket: Core-66040.

## Use of AI Tools

This ticket was mentioned in ​PR #13386 on ​WordPress/wordpress-develop by ​@desrosj.


5 weeks ago
#6

Pins the wp/6.8 branch in the gutenberg repository when testing the Gutenberg build scripts.

Trac ticket: Core-66040.

## Use of AI Tools

None

​@lancewillett commented on ​PR #13382:


5 weeks ago
#7

@desrosj Why is the diff so huge? 3,000+ lines

#8 @desrosj
5 weeks ago

  • Owner set to desrosj
  • Resolution → fixed
  • Status new → closed

In 63475:

Build/Test Tools: Support branch pinning when testing Gutenberg build scripts.

The reusable workflow responsible for testing the Gutenberg build script when cloned into the src/wp-content/plugins directory configures Node.js based on the .nvmrc file in this repository. However, this causes failures when that version is no longer compatible with the latest changes in the trunk branch of gutenberg.

The workflow is no longer used by new branches, but it’s still called by some old ones that use Node.js 20.x. When Gutenberg is updated to use 24.x in the coming days, the workflow runs for these old branches will fail because of this.

Additionally, the Gutenberg plugin has not suported these older versions of WordPress still running the workflow for some time. It only makes sense to test building gutenberg code that supports the version of WordPress running the tests.

This introduces a gutenberg-branch input so that the corresponding wp/X.Y branch from gutenberg can be pinned after a new version of WordPress is branched.

Props desrosj, lancewillett, lucatume.
Fixes #66040.

#9 @desrosj
5 weeks ago

  • Resolution fixed
  • Status closed → reopened

Reopening to make the branch pinning change in older branches.

#10 @desrosj
5 weeks ago

In 63476:

Build/Test Tools: Pin Gutenberg’s wp/6.8 branch when testing.

This pins the wp/6.8 branch of the gutenberg repository when testing build scripts to ensure only versions of Gutenberg that are compatible WordPress 6.8 are used.

Props desrosj, lancewillett, lucatume.
See #66040.

#11 @desrosj
5 weeks ago

In 63477:

Build/Test Tools: Pin Gutenberg’s wp/6.7 branch when testing.

This pins the wp/6.7 branch of the gutenberg repository when testing build scripts to ensure only versions of Gutenberg that are compatible WordPress 6.7 are used.

Reviewed by lancewillett.

Props desrosj, lancewillett, lucatume.
See #66040.

#12 @desrosj
5 weeks ago

In 63478:

Build/Test Tools: Pin Gutenberg’s wp/6.6 branch when testing.

This pins the wp/6.6 branch of the gutenberg repository when testing build scripts to ensure only versions of Gutenberg that are compatible WordPress 6.6 are used.

Reviewed by lancewillett.

Props desrosj, lancewillett, lucatume.
See #66040.

#13 @desrosj
5 weeks ago

In 63479:

Build/Test Tools: Pin Gutenberg’s wp/6.5 branch when testing.

This pins the wp/6.5 branch of the gutenberg repository when testing build scripts to ensure only versions of Gutenberg that are compatible WordPress 6.5 are used.

Reviewed by lancewillett.

Props desrosj, lancewillett, lucatume.
See #66040.

​@desrosj commented on ​PR #13382:


5 weeks ago
#14

Fixed in r63476.

​@desrosj commented on ​PR #13386:


5 weeks ago
#15

Fixed in 63477.

​@desrosj commented on ​PR #13385:


5 weeks ago
#16

Fixed in r63478.

​@desrosj commented on ​PR #13384:


5 weeks ago
#17

Fixed in 63479.

This ticket was mentioned in ​Slack in #core by adamsilverstein. ​View the logs.


5 weeks ago

#19 @adamsilverstein
5 weeks ago

@desrosj - anything we need to be aware of or do specifically for 7.1.1 here?

Please note the RC for 7.1.1 is September 10th.

#20 @desrosj
5 weeks ago

  • Milestone 7.1.1 → 7.2
  • Resolution → fixed
  • Status reopened → closed

@adamsilverstein Nope! The work is completed here and this can be closed.

This was in the milestone purely because it required updating older branches. But because the 7.1 branch did not require any changes, I'm going to move this to the 7.2 milestone so that this can be grouped with other changes related to the Node.js upgrade.

#21 @desrosj
5 weeks ago

Related: #65451.

#22 @desrosj
4 weeks ago

  • Resolution fixed
  • Status closed → reopened

Now that gutenberg's trunk branch has upgraded to Node.js 24.x, the 6.9 branch (the final one in Core using this workflow) needs to be updated with a pin as well.

This ticket was mentioned in ​PR #13569 on ​WordPress/wordpress-develop by ​@desrosj.


4 weeks ago
#23

Pins the wp/6.9 branch in the gutenberg repository when testing the Gutenberg build scripts.

Trac ticket: Core-66040.

Use of AI Tools

None

​@desrosj commented on ​PR #13569:


3 weeks ago
#24

How did that get in there? 😅 Fixed and actionlint is happy. ✅

#25 @desrosj
3 weeks ago

  • Resolution → fixed
  • Status reopened → closed

In 63650:

Build/Test Tools: Pin Gutenberg’s wp/6.9 branch when testing.

This pins the `wp/6.9 branch of the gutenberg repository when testing build scripts to ensure only versions of Gutenberg that are compatible WordPress 6.9 are used.

Reviewed by lancewillett.

Props desrosj, lancewillett.
Fixes #66040.

Note: See TracTickets for help on using tickets.