Page MenuHomePhabricator

Phan job should use composer instead of vendor for release branches ( undeclared class \Wikimedia\Equivset\Equivset )
Open, MediumPublic

Description

mediawiki/vendor.git release branches do not contain the dependencies for all projects. For release branches the test/gate-and-submit pipeline have been switched to use composer instead of vendor (T189560).

We would need a phan jobs that uses composer since the job currently fail, for example on AbuseFilter REL1_33 ( https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AbuseFilter/+/534293/ ):

<?xml version="1.0" encoding="ISO-8859-15"?>
<checkstyle version="6.5">
  <file name="includes/parser/AbuseFilterParser.php">
    <error line="71" severity="warning" message="Property \AbuseFilterParser::$equivset has undeclared type \Wikimedia\Equivset\Equivset" source="PhanUndeclaredTypeProperty"/>
    <error line="1275" severity="error" message="Call to method __construct from undeclared class \Wikimedia\Equivset\Equivset" source="PhanUndeclaredClassMethod"/>
    <error line="1278" severity="error" message="Call to method normalize from undeclared class \Wikimedia\Equivset\Equivset" source="PhanUndeclaredClassMethod"/>
  </file>
</checkstyle>

See also:

Event Timeline

Change 534395 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] jjb: convert phan jobs to job templates

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

hashar triaged this task as Medium priority.Sep 4 2019, 12:16 PM

For now I have removed the Phan jobs from the release branches ( https://gerrit.wikimedia.org/r/#/c/integration/config/+/534426/ ).

Change 534395 merged by jenkins-bot:
[integration/config@master] jjb: convert phan jobs to job templates

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

The reason against doing this is that for Wikimedia production we want to precisely match the exact versions we have available (and don't want e.g. a conditional dependency turn into a full but unmet dependency that phan doesn't flag until we deploy). However, I think we'd catch that through other means at this point, and so migrating all these jobs from a vendor check-out to a composer-based on should work without loss of test coverage. Thoughts?