Page MenuHomePhabricator

REL1_33 and REL1_34 mediawiki-core-php72-phan-docker broken
Closed, ResolvedPublic

Description

While REL1_33 isn't so important (EOL very soon as per {}T256087), but phan being broken on REL1_34 is an issue

https://integration.wikimedia.org/ci/job/mediawiki-core-php72-phan-docker/26365/console

exec docker run \
  --volume src:/mediawiki \
  --entrypoint=/run-core.sh \
  --volume src:/src \
  --volume cache:/cache \
  --volume log:/log \
  docker-registry.wikimedia.org/releng/mediawiki-phan:0.8.0 -m checkstyle
+ /run-generic.sh /mediawiki -m checkstyle
+ exec vendor/bin/phan -d . -p -m checkstyle --require-config-exists
/run-generic.sh: line 15: /mediawiki/vendor/bin/phan: No such file or directory
01:08:05 [CHECKSTYLE] Collecting checkstyle analysis files...
01:08:05 [CHECKSTYLE] Searching for all files in /srv/jenkins/workspace/workspace/mediawiki-core-php72-phan-docker that match the pattern src/tests/phan/issues/latest
01:08:05 [CHECKSTYLE] No files found. Configuration error?

Event Timeline

Reedy triaged this task as High priority.Jun 23 2020, 12:14 AM

that is using releng/mediawiki-phan:0.8.0 and it can not find phan for some reason:

/run-generic.sh: line 15: /mediawiki/vendor/bin/phan: No such file or directory
- Installing mediawiki/mediawiki-phan-config (0.7.1)

We had a commit in core to bump mediawiki-phan-config to 0.8.0 claiming it is to ensure the CI job is working ae424ce5da6604ba0e956362d084cb5acb436901. Which was for the epic T235049: Upgrade mediawiki-phan-config to 0.8.0 for all repos.

I guess we want to do the same upgrade for all branches we support?

From T235049, 0.8.0:

  • It also requires phan/phan, so that you don't have to install it manually (when testing locally), and we don't have to require it in our CI by looking at the "extra" field.

And releng/mediawiki-phan:0.7.0 dropped the back compatible layer that installed phan/phan even when it was not defined in the repo. 3d189dca904e57fac620a7fc1496117449c88c01

So I guess we want to update the composer dependency mediawiki/mediawiki-phan-config 0.8.0.

I subscribed @Daimona for input.

https://gerrit.wikimedia.org/r/#/c/integration/config/+/604335/ is probably to blame. I thought it would work with 1.34, but apparently it doesn't. I also wanted to push it that soon because, as far as I could tell, phan-related jobs were disabled for release branches a while ago (related: T226945, T231966).

Since the patch won't revert cleanly, if we want to make phan work on 1.34 we have 2 options:

  • Add some BC code to the CI script, but only what's strictly necessary for 1.34 (the patch above removed two layers of BC, of which one is for *very* old phan)
  • Upgrade phan to the first version that would work with the current image. I'm unsure what this version might be, perhaps 0.9.0. This would only work for core, though

After discussion with Daimona.

The issue only occurs for mediawiki/core release branches (we no more run phan for extensions release branches since https://gerrit.wikimedia.org/r/#/c/integration/config/+/534426/ ). I would prefer to not bring the back compatible code, but that might be just a few lines for the mediawiki/core edge case.

I am in favor of trying the 2nd option: upgrade phan in release branches and see whether it is straightforward / not too invasive :]

Change 607262 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/core@REL1_34] build: Bump mediawiki-phan-config to 0.8.0

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

Change 607262 merged by jenkins-bot:
[mediawiki/core@REL1_34] build: Bump mediawiki-phan-config to 0.8.0

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

Change 607276 had a related patch set uploaded (by Reedy; owner: Daimona Eaytoy):
[mediawiki/core@REL1_33] build: Bump mediawiki-phan-config to 0.8.0

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

Change 607276 abandoned by Reedy:
build: Bump mediawiki-phan-config to 0.8.0

Reason:
Ah, PHP version mismatch. Screw that then :)

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