#63939 closed defect (bug) (fixed)
`certificates:update` Grunt task does not actually update the dependency
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.9 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Build/Test Tools | Keywords: | has-patch |
| Focuses: | Cc: |
Description
The certificates:update Grunt task attempts to update the composer/ca-bundle dependency managed by Composer when an update is available. The task is not currently working as expected for a few reasons:
- When a
composer.lockfile is not present,composer updatecannot update an individual dependency (ie.composer update org/package) - Because the dependency is pinned to an exact version,
composer updatewould not work as expected anyway.
The workflow responsible for testing and verifying the results of the build scripts should also be updated to confirm that all related files subject to version control have been properly updated.
The certificate related scripts were originally introduced in [59740].
Change History (5)
This ticket was mentioned in PR #9769 on WordPress/wordpress-develop by @desrosj.
5 months ago
#1
@johnbillion commented on PR #9769:
5 months ago
#2
What's the bet way to test this? Manually downgrade composer/ca-bundle and then run npm run grunt certificates:upgrade-package?
5 months ago
#3
That's right.
rm -rf vendor- Change pinned version to any earlier.
- Run
composer update,npm run grunt copy:certificatesandnpm run grunt build:certificatesto put the old version in Core appropriately. Make note of the files changed in version control. npm run grunt certificates:upgrade.- The changed files under version control should disappear because it should update to the latest version.
npm run grunt certificates:upgradeshould succeed and output "latest version already installed."
Note: See
TracTickets for help on using
tickets.
Because an exact version is pinned for
composer/ca-bundle, thecomposer updatecommand cannot update the dependency to the latest version.The command would not work for an individual dependency anyway due to the fact that there is no
composer.lockfile generated.This also updates the workflow that tests the build process to verify that the certificate related files in
src/wp-includes/certificatesaffected by the Grunt tasks are up to date.Trac ticket: https://core.trac.wordpress.org/ticket/63939.