Page MenuHomePhabricator

Set up real CI for mediawiki/tools/phan
Closed, ResolvedPublic0 Estimated Story Points

Description

Similar to what we have for codesniffer, running analysis against MediaWiki core or something using the new config.

Event Timeline

Change 574231 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[integration/config@master] jjb, layout: Add a job to test new phan changes on MW core

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

Change 574231 merged by jenkins-bot:
[integration/config@master] jjb, layout: Add a job to test new phan changes on MW core

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

Mentioned in SAL (#wikimedia-releng) [2020-02-26T00:17:00Z] <James_F> Zuul: Add a job to test new phan changes on MW core T226117

OK, so, the image you're running it in doesn't have AST, which doesn't help. :-)

(And switching to composer-package-php72 isn't trivial. Meh.)

OK, so, the image you're running it in doesn't have AST, which doesn't help. :-)

Ahhhh, I didn't think about that. If adding php-ast isn't trivial, we can use the polyfill parser as a stopgap. It's slower than php-ast, but for a job like this, I think it's fine.

Change 574979 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[integration/config@master] jjb: Allow polyfill parser in phan-testrun job

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

Change 575068 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[integration/config@master] [WIP] Create a dedicated docker image for phan testrun

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

Change 574979 abandoned by Daimona Eaytoy:
jjb: Allow polyfill parser in phan-testrun job

Reason:
Per discussion

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

@Jdforrester-WMF I ended up trying with composer-merge-plugin. That's the patch above, untested. Could you please see if it works?

Change 575068 merged by jenkins-bot:
[integration/config@master] dockerfiles: Create a dedicated docker image for phan testrun

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

Mentioned in SAL (#wikimedia-releng) [2020-02-26T21:45:21Z] <James_F> Docker: Publishing mediawiki-phan-testrun:0.1.0 for T226117

Change 575092 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[integration/config@master] jjb: Bump mw-tools-phan-mwcore-testrun to image 0.1.2

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

Change 575092 merged by jenkins-bot:
[integration/config@master] jjb: Bump mw-tools-phan-mwcore-testrun to image 0.1.2

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

Phantastic! The remaining issues are due to mysqli not being installed. We should compile PHP with a bunch of additional extensions, probably copying from mediawiki-phan.

Change 575263 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[integration/config@master] dockerfiles: [mediawiki-phan-testrun] Install mysql package

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

Change 575263 merged by jenkins-bot:
[integration/config@master] dockerfiles: [mediawiki-phan-testrun] Install mysql package, minor fixes

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

Mentioned in SAL (#wikimedia-releng) [2020-02-27T15:53:06Z] <James_F> Docker: Publish mediawiki-phan-testrun:0.1.3 for T226117

It seems the new job cannot use the caches with all other CI jobs. Currently all packages are downloaded on each run

https://integration.wikimedia.org/ci/job/mw-tools-phan-mwcore-testrun/8/console

It seems the new job cannot use the caches with all other CI jobs. Currently all packages are downloaded on each run

https://integration.wikimedia.org/ci/job/mw-tools-phan-mwcore-testrun/8/console

Right. As a side note, perhaps we should add no-update to composer remove, so everything is installed in the subsequent composer update which has fancier output.

As for caching, does it have to do with:

17:04:35 Defined: CASTOR_NAMESPACE="mediawiki-tools-phan/master/mw-tools-phan-mwcore-testrun"
17:04:35 Syncing...
17:04:35 rsync: change_dir "/mediawiki-tools-phan/master/mw-tools-phan-mwcore-testrun" (in caches) failed: No such file or directory (2)
17:04:35 rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1668) [Receiver=3.1.2]
17:04:35 rsync: read error: Connection reset by peer (104)

?

Change 575600 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[integration/config@master] jjb: add cache dir for phan-testrun

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

Change 575600 merged by jenkins-bot:
[integration/config@master] jjb: add cache dir for phan-testrun

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