Page MenuHomePhabricator

Install cache/integration-tests with Wikibase CI tests
Closed, ResolvedPublic

Description

In https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Wikibase/+/441203
cache/integration-tests is added as a require-dev dependency of Wikibase
https://integration.wikimedia.org/ci/job/wmf-quibble-vendor-mysql-hhvm-docker/1117/consoleFull shows that cache/integration-tests is installed
but then it is not loaded because "git clean -xqdf" is run because composer test.

The git clean is run from this line https://github.com/wikimedia/integration-quibble/blob/a6791dc60810103f1cf961b62729d29e1e227865/quibble/test.py#L93

This can be expected as without this cleanup the tests would be run with duplicate copies of various libraries potentially at different versions.

It looks like T112895 is slightly related to this

Possible solutions

  1. Don't do the git clean, but this would be bad due to the duplicate library situation described above
  2. Add the library to the mediawiki require-dev, but this is evil as mediawiki won't actually use it.
  3. Hardcode the install of the library somewhere in CI, but this is evail as the required version would be fixed for all jobs etc and the require-dev of the extension would not actually be respected
  4. Some evil hack thing like: https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Wikibase/+/445190/
  5. Fix this properly in quibble to use composer-merge-plugin to pull in require-dev dependencies, which won't work due to conflicting dev deps
  6. Move the thing into core so that #2 isn't evil

Details

Related Gerrit Patches:

Event Timeline

Addshore created this task.Jul 12 2018, 1:33 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 12 2018, 1:33 PM
Legoktm updated the task description. (Show Details)Jul 18 2018, 10:40 AM

Change 446568 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/core@master] Install cache/integration-tests as require-dev

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

Option #2 for now, already done for hamcrest

Legoktm updated the task description. (Show Details)Jul 18 2018, 11:02 AM

Change 446568 merged by jenkins-bot:
[mediawiki/core@master] Install cache/integration-tests as require-dev

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

Hamcrest was indeed a similar use case and we went adding it to mediawiki/core require-dev. I think it boils down to not being able to composer merge require-dev of multiple extensions, since they have eg codesniffer at specific versions.

I am not sure what is the idea behind SimpleCacheWithBagOStuff , MediaWiki caching interface is BagOStuff. I guess you are experimenting toward migrating to PSR-6 / PSR-16?

I guess you are experimenting toward migrating to PSR-6 / PSR-16?

Indeed.
Which does not mean not using MediaWiki's BagOStuff etc, just wrapping it into PSR-16 interface.

Which does not mean not using MediaWiki's BagOStuff etc, just wrapping it into PSR-16 interface.

That is how computer science has been proceeding for decades. Middle ware / adaptation layers between old and new API :] I am looking forward to migrate to that PSR interface!


https://gerrit.wikimedia.org/r/446568 (Install cache/integration-tests as require-dev) got merged so I guess this task is resolved?

Addshore closed this task as Resolved.Jul 25 2018, 4:52 PM