Page MenuHomePhabricator

libraryupgrader missed some repos due to Generic.Files.LineLength.TooLong
Open, LowestPublic

Description

From https://libraryupgrader.wmflabs.org/logs/2018-09-02/mediawiki_extensions_MathSearchmediawiki-codesniffer.log

> phpcbf -p
....F......F.FF.....FFF..FF....FF.....F.F...F...FF.......... 60 / 65 (92%)
.....                                                        65 / 65 (100%)



PHPCBF RESULT SUMMARY
----------------------------------------------------------------------
FILE                                                  FIXED  REMAINING
----------------------------------------------------------------------
/usr/src/myapp/repo/FormulaInfo.php                   4      17
/usr/src/myapp/repo/SpecialMathDebug.php              6      13
/usr/src/myapp/repo/SpecialMathIndex.php              3      12
/usr/src/myapp/repo/SpecialUploadResult.php           1      6
/usr/src/myapp/repo/includes/MathSearchUtils.php      1      2
/usr/src/myapp/repo/includes/MathoidDriver.php        1      7
/usr/src/myapp/repo/includes/MathosphereDriver.php    2      8
/usr/src/myapp/repo/includes/WikidataDriver.php       1      2
...c/myapp/repo/includes/engines/MathEngineBaseX.php  3      7
...myapp/repo/includes/special/SpecialMathSearch.php  1      9
...rc/myapp/repo/includes/special/SpecialMlpEval.php  2      12
...src/myapp/repo/maintenance/CreateDB2MathTable.php  1      0
/usr/src/myapp/repo/maintenance/ExportCache.php       3      1
.../src/myapp/repo/maintenance/ImportDefinitions.php  1      0
/usr/src/myapp/repo/maintenance/QueryEval.php         9      7
/usr/src/myapp/repo/maintenance/UpdateMath.php        7      1
----------------------------------------------------------------------
A TOTAL OF 46 ERRORS WERE FIXED IN 16 FILES
----------------------------------------------------------------------

Time: 2.03 secs; Memory: 16Mb


Script phpcbf -p handling the fix event returned with error code 1
Do not run Composer as root/super user! See https://getcomposer.org/root for details
> parallel-lint . --exclude vendor --exclude node_modules
PHP 7.0.30 | 10 parallel jobs
............................................................ 60/65 (92 %)
.....                                                        65/65 (100 %)


Checked 65 files in 0.4 seconds
No syntax error found
> phpcs -p -s
................................................W........... 60 / 65 (92%)
.....                                                        65 / 65 (100%)



FILE: /usr/src/myapp/repo/maintenance/QueryEval.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 87 | WARNING | Line exceeds 100 characters; contains 101
    |         | characters (Generic.Files.LineLength.TooLong)
----------------------------------------------------------------------

Time: 1.33 secs; Memory: 14Mb

Script phpcs -p -s handling the test event returned with error code 1
{'MediaWiki.Usage.NestedFunctions.NestedFunction', 'Generic.Files.OneObjectStructurePerFile.MultipleFound', 'MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName', 'MediaWiki.Commenting.FunctionComment.WrongStyle', 'MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic', 'MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected', 'MediaWiki.Commenting.FunctionAnnotations.UnrecognizedAnnotation', 'MediaWiki.Files.ClassMatchesFilename.NotMatch', 'MediaWiki.Commenting.MissingCovers.MissingCovers', 'MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment', 'Squiz.Scope.MethodScope.Missing', 'MediaWiki.Usage.DbrQueryUsage.DbrQueryFound'}
Tests fail!
Tests still failing. Skipping

It is okay to not exclude new Generic.Files.LineLength.TooLong issues, but it should upload the patch set and add a comment with the failure or so.

Please rerun for:
MathSearch
TimedMediaHandler

Event Timeline

I believe this is happening due to autofixes extending the max line length and then LU getting confused about how new errors that didn't exist before were being introduced.

Happen on canary right now: https://libraryupgrader2.wmcloud.org/logs2/256097

That breaks the whole upgrade process until manual handling. Not sure if there is a good way to suppress the issues. But than the question is, which issues are okay at this late point and which indicating an error and should stop the process.

I think it's reasonable if there's only a handful of repos and we work through them manually.

That sounds okay to me, too.

Legoktm triaged this task as Lowest priority.

I would like to properly fix this at some point.