Page MenuHomePhabricator

Quibble build fails with Error: Class 'Doctrine\Common\Annotations\Annotation' not found
Closed, ResolvedPublic

Description

Running Quibble utils/ci-fullrun-extensions.sh failed runs Quibble with mediawiki/extensions/GrowthExperiments. The build has failed

https://integration.wikimedia.org/ci/job/integration-quibble-fullrun-extensions/177/consoleFull

> php tests/phpunit/phpunit.php '-c' 'tests/phpunit/suite.xml' 'extensions/GrowthExperiments' '--group' 'Standalone' '--exclude-group' 'Broken,ParserFuzz,Stub'
Using PHP 7.4.30
[b1ac698aebf909489354fd71] [no req]   Error: Class 'Doctrine\Common\Annotations\Annotation' not found
Backtrace:
from /workspace/src/extensions/GrowthExperiments/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/TopLevelAnnotation.php(6)
#0 /workspace/src/extensions/GrowthExperiments/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/AbstractReaderTest.php(19): require_once()
#1 /workspace/src/vendor/phpunit/phpunit/src/Util/FileLoader.php(66): include_once(string)
#2 /workspace/src/vendor/phpunit/phpunit/src/Util/FileLoader.php(49): PHPUnit\Util\FileLoader::load()
#3 /workspace/src/vendor/phpunit/phpunit/src/Framework/TestSuite.php(395): PHPUnit\Util\FileLoader::checkAndLoad()
#4 /workspace/src/vendor/phpunit/phpunit/src/Framework/TestSuite.php(525): PHPUnit\Framework\TestSuite->addTestFile()
#5 /workspace/src/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php(98): PHPUnit\Framework\TestSuite->addTestFiles()
#6 /workspace/src/vendor/phpunit/phpunit/src/TextUI/Command.php(121): PHPUnit\Runner\BaseTestRunner->getTest()
#7 /workspace/src/tests/phpunit/phpunit.php(101): PHPUnit\TextUI\Command->run()
#8 /workspace/src/tests/phpunit/phpunit.php(153): PHPUnitMaintClass->execute()
#9 {main}
Script php tests/phpunit/phpunit.php handling the phpunit event returned with error code 255
Script @phpunit -c tests/phpunit/suite.xml was called via phpunit:entrypoint

Event Timeline

Note the test comes from /workspace/src/extensions/GrowthExperiments/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/TopLevelAnnotation.php

The tests are run by the stage PHPUnit default standalone suite on extensions/GrowthExperiments:

composer run --timeout=0 phpunit:entrypoint -- extensions/GrowthExperiments --group Standalone --exclude-group Broken,ParserFuzz,Stub
php tests/phpunit/phpunit.php '-c' 'tests/phpunit/suite.xml' 'extensions/GrowthExperiments' '--group' 'Standalone' '--exclude-group' 'Broken,ParserFuzz,Stub'

doctrine/annotations is a dependency of phpbench/phpbench. I am guessing composer install got run and not cleaned out despite us running Start: Revert to git clean -xqdf in /workspace/src/extensions/GrowthExperiments

Trying locally with: ZUUL_PROJECT=mediawiki/extensions/GrowthExperiments quibble --git-cache ~/projects --run=composer-test did the git clean -xqdf and the vendor directory got deleted from GrowthExperiments.

I think I am willing to blame Docker/WMCS disk not really doing the deletes?

Is it happening consistently? Only for GrowthExperiments?

Change 850175 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/quibble@master] Warn if files are left over after git clean -xqdf

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

It happened at least once and a next build after a recheck passed just fine. I think it is an off by one issue with Docker which would not register the file deletions when running git clean -xqdf. I have wrote a basic patch that would log.warning the output of git status --ignored. It should always be empty after a git clean -xqdf. That might assist in a future debugging.

Beside that, I am willing to ignore the issue for now. It must be some kind of low level issue with the filesystem or Docker itself :-\

I am tempted to blame some weird issue with unlink system call not being reflected immediately due to Docker/WMCS/Ceph/Linux Kernel. https://gerrit.wikimedia.org/r/850175 would at least give us the output of git status --ignored after git clean -xqdf has been run which would give us some indication as to why a build failed. Beside that, I don't see anything we can dig in, short of being able to reproduce the issue (I tried and could not).

Change 850175 merged by jenkins-bot:

[integration/quibble@master] Warn if files are left over after git clean -xqdf

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

Change 890809 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[integration/quibble@master] release: Quibble 1.5.0

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

Change 890809 merged by jenkins-bot:

[integration/quibble@master] release: Quibble 1.5.0

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

Change 890817 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] dockerfiles: update to Quibble 1.5.0

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

Change 890817 merged by jenkins-bot:

[integration/config@master] dockerfiles: update to Quibble 1.5.0

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

Change 891548 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] jjb: switch jobs to Quibble 1.5.0

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

Change 891548 merged by jenkins-bot:

[integration/config@master] jjb: switch jobs to Quibble 1.5.0

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

hashar claimed this task.

The issue has not been fixed cause we haven't found the root cause. I have added some log warnings when files are still present which might assist debugging the issue further if we encounter it again:

Change 850175 merged by jenkins-bot:

[integration/quibble@master] Warn if files are left over after git clean -xqdf

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

That has been released with Quibble 1.5.0 which has been deployed to all CI Jenkins jobs.