Page MenuHomePhabricator

Default link by jenkins-bot on Gerrit for mediawiki-core-php70-phan-docker does not show failures
Closed, ResolvedPublic

Description

When the mediawiki-core-php70-phan-docker job fails due to the patch adding phan "error" level violations, the link reported to Gerrit by jenkins-bot takes me to https://integration.wikimedia.org/ci/job/mediawiki-core-php70-phan-docker/1271/checkstyleResult/, which says there were "0 warnings" in total, including all priorities.

Clicking on the Console Output shows that there were, in fact, some errors output. The relevant bit, since I know these eventually expire:

19:29:04 [mediawiki-core-php70-phan-docker] $ /bin/bash -xe /tmp/jenkins3158697743129440311.sh
19:29:04 ++ pwd
19:29:04 + exec docker run --rm --volume /srv/jenkins-workspace/workspace/mediawiki-core-php70-phan-docker/src:/mediawiki wmfreleng/mediawiki-phan:v2017.10.16.20.38 -m checkstyle
19:29:04 + umask 002
19:29:04 + /mediawiki/tests/phan/bin/phan -m checkstyle
19:30:00 <?xml version="1.0" encoding="ISO-8859-15"?>
19:30:00 <checkstyle version="6.5">
19:30:00   <file name="includes/user/User.php">
19:30:00     <error line="2372" severity="warning" message="Parameter of undeclared type \IDatabase" source="PhanUndeclaredTypeParameter"/>
19:30:00     <error line="2404" severity="error" message="Call to method insert from undeclared class \IDatabase" source="PhanUndeclaredClassMethod"/>..
19:30:00     <error line="4410" severity="warning" message="Parameter of undeclared type \IDatabase" source="PhanUndeclaredTypeParameter"/>
19:30:00     <error line="4414" severity="error" message="Call to method insert from undeclared class \IDatabase" source="PhanUndeclaredClassMethod"/>..
19:30:00   </file>
19:30:00   <file name="maintenance/reassignEdits.php">
19:30:00     <error line="190" severity="warning" message="Parameter of undeclared type \IDatabase" source="PhanUndeclaredTypeParameter"/>
19:30:00   </file>
19:30:00 </checkstyle>
19:30:00 Build step 'Execute shell' marked build as failure
19:30:00 [PostBuildScript] - Execution post build scripts.
19:30:00 [PostBuildScript] Build is not success : do not execute script
19:30:00 [CHECKSTYLE] Collecting checkstyle analysis files...
19:30:00 [CHECKSTYLE] Searching for all files in /srv/jenkins-workspace/workspace/mediawiki-core-php70-phan-docker that match the pattern src/tests/phan/issues/latest
19:30:00 [CHECKSTYLE] No files found. Configuration error?
19:30:00 [CHECKSTYLE] Computing warning deltas based on reference build #1270
19:30:00 [CHECKSTYLE] Ignore new warnings since this is the first valid build
19:30:00 [CHECKSTYLE] Plug-in Result: Success - no threshold has been exceeded
19:30:00 Finished: FAILURE

Is it writing the test result data to standard output instead of to the expected file, perhaps?

Event Timeline

Based on 19:30:00 [CHECKSTYLE] No files found. Configuration error? your hunch seems correct that it's not writing to the XML file.

Legoktm triaged this task as Unbreak Now! priority.Nov 16 2017, 2:37 AM

This basically means all the phan jobs aren't actually doing anything.

This basically means all the phan jobs aren't actually doing anything.

Not quite right, the phan jobs still pass and fail at the right time, they just don't pass their output into the fancy CHECKSTYLE plugin for display in the jenkins ui.

Addshore lowered the priority of this task from Unbreak Now! to High.Dec 11 2017, 1:04 PM

Changing from UBN to High, as this is not UBN, the errors are still visible in the console log.

Krinkle renamed this task from Jenkins isn't showing mediawiki-core-php70-phan-docker failure output to Default link by jenkins-bot on Gerrit for mediawiki-core-php70-phan-docker does not show failures.Feb 20 2018, 10:31 PM
Krinkle updated the task description. (Show Details)
Krinkle subscribed.

I thought this was about a distinction between "errors" and "warnings". The CheckStyle report talks about "0 warnings" where the console output includes <error> tags. However, it seems unlikely that "errors" would be considered less important than "warnings".

If there is indeed never anything in the CheckStyle report, I suggest we take the simplest first action, which is to change the link output by jenkins-bot to point to the Console Output page instead of the (always empty) CheckStyle page. We already do this for other jobs like phpunit, qunit and npm.

Change 413060 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[integration/config@master] Disable custom 'checkstyleResult' failure link for phan jobs

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

Change 413060 merged by jenkins-bot:
[integration/config@master] Disable custom 'checkstyleResult' failure link for phan jobs

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

Krinkle claimed this task.
Krinkle edited projects, added Performance-Team; removed Patch-For-Review.