Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 months ago

#53606 closed defect (bug) (fixed)

wp-api-generated.js needs updating, needs CI to test for changes

Reported by: johnbillion's profile johnbillion Owned by: johnbillion's profile johnbillion
Milestone: 5.8 Priority: normal
Severity: normal Version: 5.8
Component: Build/Test Tools Keywords: has-unit-tests dev-reviewed commit
Focuses: Cc:

Description

The tests/qunit/fixtures/wp-api-generated.js file is under version control and it gets written to during the test_build_wp_api_client_fixtures() test. Sometimes when the REST API schema gets updated this file gets forgotten.

This is currently the case and was introduced in [51241]. The file is not up to date with the latest REST API schema.

To reproduce:

composer test -- --filter test_build_wp_api_client_fixtures && git status --exit-code

We should:

  • Update wp-api-generated.js to reflect the latest schema
  • Add tests to CI so it fails if this happens again

Change History (12)

#1 @desrosj
3 years ago

In 51351:

Tests: Update the wp-api-generated.js fixture.

Follow up to [51241].

Props johnbillion.
See #53606.

#2 @johnbillion
3 years ago

  • Keywords has-unit-tests dev-feedback added; needs-patch needs-unit-tests removed

#3 @desrosj
3 years ago

  • Keywords dev-reviewed commit added; dev-feedback removed

PR looks good. Marking for commit and backport.

#4 @johnbillion
3 years ago

  • Component changed from REST API to Build/Test Tools
  • Owner set to johnbillion
  • Status changed from new to accepted

#5 @johnbillion
3 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 51355:

Build/Test Tools: Add assertions to ensure version-controlled files are not modified during CI, and fix the grunt clean command.

Some tests and some commands that run during the build steps modify files that are under version control. This adds assertions to ensure that these files don't remain in a modified state after the test runs on CI.

This also fixes the grunt clean command which erroneously deletes script-loader-packages.php. This file is re-populated during the build, but deleting it during the clean is undesirable.

Fixes #53606

#6 @johnbillion
3 years ago

In 51357:

Build/Test Tools: Add assertions to ensure version-controlled files are not modified during CI, and fix the grunt clean command.

Some tests and some commands that run during the build steps modify files that are under version control. This adds assertions to ensure that these files don't remain in a modified state after the test runs on CI.

This also fixes the grunt clean command which erroneously deletes script-loader-packages.php. This file is re-populated during the build, but deleting it during the clean is undesirable.

Merges [51355] to the 5.8 branch.

Fixes #53606

#7 @peterwilsoncc
3 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

[51351] looks good for backporting to the 5.8 branch.

#8 @desrosj
3 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 51361:

Tests: Update the wp-api-generated.js fixture.

Follow up to [51241].

Props johnbillion, peterwilsoncc.
Merges [51351] to the 5.8 branch.
Fixes #53606.

#10 @desrosj
3 months ago

In 58598:

Build/Test Tools: Make use of new reusable workflows for 5.7.

This updates the 5.7 branch to utilize the new reusable workflows in trunk introduced in [58165].

This also includes backports for a some additional improvements and bug fixes that are necessary for the local development environment to continue working long term:

  • The image and platform properties for the mysql container have been updated to always prefer amd64 containers (#60822).
  • macos-13 is now pinned for MacOS jobs instead of macos-latest (#61340).
  • Run E2E tests with and without SCRIPT_DEBUG (#58661).
  • Migrating to Docker Compose V2 (#60901).
  • Removing the version property from docker-compose.yml (#59416).
  • Improvements to how artifacts and comments for Playground testing are generated.
  • Removing SVN related commands causing failures (#61216).
  • Updating the actions/github-scripts action to the latest version.
  • Cache the results of PHP_CodeSniffer runs (#49783).
  • A fix to grunt clean to prevent script-loader-packages.php from being deleted (#53606).

Merges [51355], [52179], [56113], [56114], [57918], [58157], [57124], [57125], [57249] to the 5.7 branch.

Props johnbillion, joemcgill, swissspidy, thelovekesh, narenin, mukesh27, JeffPaul, peterwilsoncc, zieladam, ockham, SergeyBiryukov, jorbin, Clorith, afragen, jrf.
See #48783, #61340, #60822, #61216, #60901, #61101, #59416, #59805, #61213, #58661, #53606.

#11 @desrosj
3 months ago

In 58605:

Build/Test Tools: Make use of new reusable workflows for 5.6.

This updates the 5.6 branch to utilize the new reusable workflows in trunk introduced in [58165].

This also includes backports for a some additional improvements and bug fixes that are necessary for the local development environment to continue working long term:

  • The image and platform properties for the mysql container have been updated to always prefer amd64 containers (#60822).
  • macos-13 is now pinned for MacOS jobs instead of macos-latest (#61340).
  • Run E2E tests with and without SCRIPT_DEBUG (#58661).
  • Migrating to Docker Compose V2 (#60901).
  • Removing the version property from docker-compose.yml (#59416).
  • Improvements to how artifacts and comments for Playground testing are generated.
  • Removing SVN related commands causing failures (#61216).
  • Updating the actions/github-scripts action to the latest version.
  • Cache the results of PHP_CodeSniffer runs (#49783).
  • Move the Memcached container into the Docker Compose config (#55700).
  • Configure Xdebug modes in the local Docker environment (#56022).
  • Improvements to the healthcheck command for the mysql container (#58867).
  • A fix to grunt clean to prevent script-loader-packages.php from being deleted (#53606).

Merges [51355], [51673], [52179], [53552], [53895], [56113], [56114], [56464], [57918], [58157], [57124], [57125], [57249] to the 5.6 branch.

Props johnbillion, joemcgill, swissspidy, thelovekesh, narenin, mukesh27, JeffPaul, peterwilsoncc, zieladam, ockham, SergeyBiryukov, jorbin, Clorith, afragen, jrf.
See #49783, #58867, #61340, #60822, #61216, #60901, #61101, #56022, #59416, #59805, #61213, #58661, #53606.

#12 @desrosj
3 months ago

In 58610:

Build/Test Tools: Make use of new reusable workflows for 5.5.

This updates the 5.5 branch to utilize the new reusable workflows in trunk introduced in [58165].

This also includes backports for a some additional improvements and bug fixes that are necessary for the local development environment to continue working long term:

  • The image and platform properties for the mysql container have been updated to always prefer amd64 containers (#60822).
  • macos-13 is now pinned for MacOS jobs instead of macos-latest (#61340).
  • Migrating to Docker Compose V2 (#60901).
  • Removing the version property from docker-compose.yml (#59416).
  • Improvements to how artifacts and comments for Playground testing are generated.
  • Removing SVN related commands causing failures (#61216).
  • Updating the actions/github-scripts action to the latest version.
  • Cache the results of PHP_CodeSniffer runs (#49783).
  • Move the Memcached container into the Docker Compose config (#55700).
  • Improvements to the healthcheck command for the mysql container (#58867).
  • A fix to grunt clean to prevent script-loader-packages.php from being deleted (#53606).
  • Skip some tests when not in the primary branch (#50401).

Merges [49264], [51355], [51673], [52179], [53552], [53895], [56464], [57918], [58157], [57124], [57125], [57249] to the 5.5 branch.

Props johnbillion, joemcgill, swissspidy, thelovekesh, narenin, mukesh27, JeffPaul, peterwilsoncc, zieladam, ockham, SergeyBiryukov, jorbin, Clorith, afragen, jrf.
See #49783, #58867, #61340, #60822, #61216, #60901, #61101, #59416, #59805, #61213, #53606.

Note: See TracTickets for help on using tickets.