Page MenuHomePhabricator

[SW] Wikibase secondary CI is broken and email sending is broken again (Dec 2023)
Open, Needs TriagePublic

Description

Yesterday, our Wikibase Secondary CI on GitHub for changes merged to master broke.
It seems the immediate cause is phpunit: Deprecate suite.xml and composer phpunit:entrypoint (If2ffe052) coming from T227900: Phase out usage of tests/phpunit/suite.xml.

The last successful Wikibase Secondary CI run had

[...]
+ cd ../mediawiki
+ composer phpunit:entrypoint -- --group Wikibase
> phpunit '-c' 'tests/phpunit/suite.xml' '--group' 'Wikibase'
Using PHP 7.4.33
[...]

but the failing ones now have

[...]
+ cd ../mediawiki
+ composer phpunit:entrypoint -- --group Wikibase
> phpunit '--group' 'Wikibase'
PHPUnit 9.5.28 by Sebastian Bergmann and contributors.

Usage:
  phpunit [options] UnitTest.php
  phpunit [options] <directory>

Code Coverage Options:
[...]

Acceptance criteria

Event Timeline

Hmmmm I don't quite understand why PHPUnit is printing the usage and then aborting. It's definitely not the first time I'm seeing this, but I can't remember what the cause is.

Hmmmm I don't quite understand why PHPUnit is printing the usage and then aborting. It's definitely not the first time I'm seeing this, but I can't remember what the cause is.

Maybe it can't find a config file? That would be weird though, as it should use the phpunit.xml.dist in MW core by default.

Hmmmm I don't quite understand why PHPUnit is printing the usage and then aborting. It's definitely not the first time I'm seeing this, but I can't remember what the cause is.

Maybe it can't find a config file? That would be weird though, as it should use the phpunit.xml.dist in MW core by default.

That is it! We're not cloning MediaWiki here, we're downloading it via wget -O- https://github.com/wikimedia/mediawiki/archive/$MW_BRANCH.tar.gz and the .gitattributes file has phpunit.xml.dist export-ignore, so that file is not included there.

I got to go now, but will think tomorrow about what direction this should best be fixed.

Thoughts welcome :)

That is it! We're not cloning MediaWiki here, we're downloading it via wget -O- https://github.com/wikimedia/mediawiki/archive/$MW_BRANCH.tar.gz and the .gitattributes file has phpunit.xml.dist export-ignore, so that file is not included there.

Jeeeeeeez. Thanks for figuring that out ^^

Apparently the motivation for that is “to keep DocumentRoot clear for tar-ball installs” (Gerrit comment); tests/ instead has an .htaccess file, so that’s why we don’t export-ignore all of tests/, I guess.

We should probably just use a real git clone? With --depth=1 it hopefully shouldn’t take much longer than downloading the tarball.

That is it! We're not cloning MediaWiki here, we're downloading it via wget -O- https://github.com/wikimedia/mediawiki/archive/$MW_BRANCH.tar.gz and the .gitattributes file has phpunit.xml.dist export-ignore, so that file is not included there.

Jeeeeeeez. Thanks for figuring that out ^^

Apparently the motivation for that is “to keep DocumentRoot clear for tar-ball installs” (Gerrit comment); tests/ instead has an .htaccess file, so that’s why we don’t export-ignore all of tests/, I guess.

We should probably just use a real git clone? With --depth=1 it hopefully shouldn’t take much longer than downloading the tarball.

Yeah, that's what I did in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/EntitySchema/+/987955 and it works fine. It should work here just as well.

(Though, I did not find an answer for why we actually switched to downloading the tarball back in 2014 for TravisCI. We originally started out with cloning it as well.)

Change 988657 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/Wikibase@master] Fix secondary CI on GitHub by actually cloning MediaWiki

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

Change 988657 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Fix secondary CI on GitHub by actually cloning MediaWiki

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

Prio Notes:

Impact AreaAffected
production / end users
monitoring
development efforts
onboarding efforts
additional stakeholders

(Additional stakeholders: other Wikidata/Wikibase teams.)

Lucas_Werkmeister_WMDE renamed this task from Wikibase secondary CI is broken and email sending is broken again (Dec 2023) to [SW] Wikibase secondary CI is broken and email sending is broken again (Dec 2023).Mar 12 2024, 9:30 AM