Page MenuHomePhabricator

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


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

exec docker run \
  --volume src:/mediawiki \
  --entrypoint=/ \
  --volume src:/src \
  --volume cache:/cache \
  --volume log:/log \ -m checkstyle
+ / /mediawiki -m checkstyle
+ exec vendor/bin/phan -d . -p -m checkstyle --require-config-exists
/ 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:

/ 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. 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 ). 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

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

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

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

Ah, PHP version mismatch. Screw that then :)