Page MenuHomePhabricator

phpunit-patch-coverage fails if a file was renamed
Closed, ResolvedPublic

Description

21:16:05 PHP Notice:  Undefined index: R in /opt/phpunit-patch-coverage/vendor/mediawiki/phpunit-patch-coverage/src/Git.php on line 57
21:16:05 PHP Fatal error:  Uncaught Error: Cannot access empty property in /opt/phpunit-patch-coverage/vendor/mediawiki/phpunit-patch-coverage/src/Git.php:59
21:16:05 Stack trace:
21:16:05 #0 /opt/phpunit-patch-coverage/vendor/mediawiki/phpunit-patch-coverage/src/CheckCommand.php(161): MediaWiki\Tool\PatchCoverage\Git->getChangedFiles('9f86db20286c2c3...')
21:16:05 #1 /opt/phpunit-patch-coverage/vendor/symfony/console/Command/Command.php(251): MediaWiki\Tool\PatchCoverage\CheckCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
21:16:05 #2 /opt/phpunit-patch-coverage/vendor/symfony/console/Application.php(946): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
21:16:05 #3 /opt/phpunit-patch-coverage/vendor/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(MediaWiki\Tool\PatchCoverage\CheckCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfo in /opt/phpunit-patch-coverage/vendor/mediawiki/phpunit-patch-coverage/src/Git.php on line 59

https://integration.wikimedia.org/ci/job/mediawiki-phpunit-coverage-patch-docker/792/console

Looks like I didn't think about file renames when implementing https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/tools/phpunit-patch-coverage/+/master/src/Git.php#28

Probably it would be easiest to consider renames as deletion of one file and creation of another.

Details

Related Gerrit Patches:
mediawiki/tools/phpunit-patch-coverage : masterProperly handle renamed files

Event Timeline

Legoktm created this task.Aug 22 2018, 12:09 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 22 2018, 12:09 AM
Legoktm claimed this task.Feb 3 2019, 9:32 AM

Change 487635 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/tools/phpunit-patch-coverage@master] Properly handle renamed files

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

Change 487635 merged by jenkins-bot:
[mediawiki/tools/phpunit-patch-coverage@master] Properly handle renamed files

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

Krinkle triaged this task as Medium priority.Feb 7 2019, 2:31 AM
Krinkle removed a project: Patch-For-Review.
Legoktm closed this task as Resolved.Feb 7 2019, 6:40 PM

For your information, it seems the CI relevant for https://gerrit.wikimedia.org/r/492298 is still running an old version of the script in question.

Krinkle reopened this task as Open.Mar 1 2019, 2:40 AM

Re-opening for now as reminder to release/deploy. (Sorry)

Reedy added a subscriber: Reedy.Apr 14 2019, 4:47 PM

Re-opening for now as reminder to release/deploy. (Sorry)

I guess we need to use the 0.0.10 release into the quibble-fresnel, quibble-stretch and quibble-stretch-php70 ?