Page MenuHomePhabricator

mediawiki/vendor can't be updated due to phpunit reporting composer.lock failure
Closed, ResolvedPublic

Description

As of change 891802 (T330228), patches to update mediawiki/vendor are consistently failing with:

Error: your composer.lock file is not up to date.

Interestingly, it is not reporting which packages are missing or outdated. This appears to be an impossible condition because maintenance/checkComposerLockUpToDate.php (as called from composer phpunit bootstrap), explicilty checks whether the two "problem" arrays are empty.

In addition to not printing out what the problem is, it also appears unfixable. @Reedy and myself have both tried to generate the lock file cleanly and it won't accept it. This is at https://gerrit.wikimedia.org/r/c/mediawiki/vendor/+/896656/ (for wikimedia/less.php) and https://gerrit.wikimedia.org/r/c/mediawiki/vendor/+/901744/ (wikimedia/minify).

Event Timeline

With the help of @tstarling, we determined the cause of these two separate issues.

  1. CheckComposerLockUpToDate is using output() instead of error(), thus given quiet=>true, we don't get the important messages right before it.

Once the above is fixed, I'm fairly sure that the failure it tells is simply that during the vendor patch we see composer.json (from core) requiring something that vendor doesn't satisfy. This is expected, since this is the commit changing that very thing. We have a similar kind of check in maintenance/update.php where Quibble passes --skip-external-dependencies for this reason when the CI run is using mediawiki/vendor.

The change that broke vendor CI adds support for an MW_SKIP_EXTERNAL_DEPENDENCIES env variable, that we can set to restore this.

  1. Update Quibble to set MW_SKIP_EXTERNAL_DEPENDENCIES=1 in the same condition where we pass --skip-external-dependencies.

Change 903829 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/core@master] phpunit: Use error() in CheckComposerLockUpToDate for pre-fatal details

https://gerrit.wikimedia.org/r/903829

Change 903832 had a related patch set uploaded (by Krinkle; author: Krinkle):

[integration/quibble@master] Set MW_SKIP_EXTERNAL_DEPENDENCIES in AbstractPhpUnit for vendor jobs

https://gerrit.wikimedia.org/r/903832

Change 903829 merged by jenkins-bot:

[mediawiki/core@master] phpunit: Use error() in CheckComposerLockUpToDate for pre-fatal details

https://gerrit.wikimedia.org/r/903829

Change 903832 merged by jenkins-bot:

[integration/quibble@master] Set MW_SKIP_EXTERNAL_DEPENDENCIES for vendor jobs

https://gerrit.wikimedia.org/r/903832

Change 904867 had a related patch set uploaded (by Krinkle; author: Krinkle):

[integration/quibble@master] release: Quibble 1.5.4

https://gerrit.wikimedia.org/r/904867

Change 905167 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] dockerfiles: update to Quibble 1.5.4

https://gerrit.wikimedia.org/r/905167

Change 904867 merged by jenkins-bot:

[integration/quibble@master] release: Quibble 1.5.4

https://gerrit.wikimedia.org/r/904867

Change 905167 merged by jenkins-bot:

[integration/config@master] dockerfiles: update to Quibble 1.5.4

https://gerrit.wikimedia.org/r/905167

Change 905190 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] jjb: update Quibble jobs to 1.5.4

https://gerrit.wikimedia.org/r/905190

Change 905190 merged by jenkins-bot:

[integration/config@master] jjb: update Quibble jobs to 1.5.4

https://gerrit.wikimedia.org/r/905190

Are we just keeping this open for blame-storming purposes / follow-up to stop this happening again?

AIUI the bug-as-filed has been fixed since CI was switched to the latest Quibble version on Tuesday last week, and I updated and landed the two vendor patches mentioned in the description.

Krinkle claimed this task.

Are we just keeping this open for blame-storming purposes / follow-up to stop this happening again?

No. As per Selena, "this" needs to have an owner. However, realistically that can't happen in the current org structure, resource allocation, and associated politics. By the time that is solved, this task will be long forgotten and nothing but an unrepresentative sample of a larger problem.