Page MenuHomePhabricator

All mwcore-codehealth-patch jobs failing
Closed, ResolvedPublic

Description

The error is:

14:04:51 java.lang.UnsupportedOperationException: Can not add the same measure twice on tests/phpunit/unit/includes/utils/UrlUtilsTest.php: DefaultMeasure[component=tests/phpunit/unit/includes/utils/UrlUtilsTest.php,metric=Metric[uuid=<null>,key=skipped_tests,description=Number of skipped unit tests,type=INT,direction=-1,domain=Coverage,name=Skipped Unit Tests,qualitative=true,userManaged=false,enabled=true,worstValue=<null>,bestValue=0.0,optimizedBestValue=true,hidden=false,deleteHistoricalData=false,decimalScale=<null>],value=0,fromCore=false,storage=org.sonar.scanner.sensor.DefaultSensorStorage@1559e7dd,saved=false]
14:04:51 	at org.sonar.scanner.sensor.DefaultSensorStorage.saveMeasure(DefaultSensorStorage.java:163)
14:04:51 	at org.sonar.scanner.sensor.DefaultSensorStorage.store(DefaultSensorStorage.java:123)
14:04:51 	at org.sonar.api.batch.sensor.measure.internal.DefaultMeasure.doSave(DefaultMeasure.java:82)
14:04:51 	at org.sonar.api.batch.sensor.internal.DefaultStorable.save(DefaultStorable.java:31)
14:04:51 	at org.sonar.plugins.php.phpunit.TestFileReport.saveTestMeasures(TestFileReport.java:56)
14:04:51 	at org.sonar.plugins.php.phpunit.TestResultImporter.importReport(TestResultImporter.java:49)
14:04:51 	at org.sonar.plugins.php.phpunit.PhpUnitReportImporter.importExternalReport(PhpUnitReportImporter.java:60)
14:04:51 	at org.sonar.plugins.php.phpunit.PhpUnitReportImporter.lambda$execute$0(PhpUnitReportImporter.java:50)
14:04:51 	at java.base/java.util.Collections$SingletonList.forEach(Collections.java:4856)
14:04:51 	at org.sonar.plugins.php.phpunit.PhpUnitReportImporter.execute(PhpUnitReportImporter.java:48)
14:04:51 	at org.sonar.plugins.php.PHPSensor.processTestsAndCoverage(PHPSensor.java:153)
14:04:51 	at org.sonar.plugins.php.PHPSensor.execute(PHPSensor.java:139)
14:04:51 	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:62)
14:04:51 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
14:04:51 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:48)
14:04:51 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:66)
14:04:51 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:48)
14:04:51 	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
14:04:51 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
14:04:51 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
14:04:51 	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:440)
14:04:51 	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:436)
14:04:51 	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:394)
14:04:51 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
14:04:51 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
14:04:51 	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
14:04:51 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
14:04:51 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
14:04:51 	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:58)
14:04:51 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
14:04:51 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
14:04:51 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:04:51 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
14:04:51 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
14:04:51 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
14:04:51 	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
14:04:51 	at com.sun.proxy.$Proxy0.execute(Unknown Source)
14:04:51 	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
14:04:51 	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
14:04:51 	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
14:04:51 	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
14:04:51 	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
14:04:51 ERROR:

Event Timeline

MediaWiki code search for mwcore-codehealth-patch finds two mentions in integration/config repositry, zuul/layout.yaml file.

I couldn't find the job running for the latest 10 open mediawiki/core patches. (787433, 786318, 787489, 786436, 778573, 757965, 776355, 779130, 765249, 775882)

Per https://integration.wikimedia.org/ci/job/mwcore-codehealth-patch/jobConfigHistory/ (only available to CI admins), the job was last changed on 2022-03-18_13-24-19, probably for 87739199d8bcc53315cc912ac3c28a104f856712 where the upgrade to Quibble 1.4.4 was reverted.

Argh. 🤦‍♂️ In my defense, I've landed at https://integration.wikimedia.org/job/mwcore-codehealth-patch after searching for mwcore-codehealth-patch in Jenkins (link).

I'm additionally confused by 787503/1. When I click the SonarCloud link I get The requested project does not exist.

sonarcloud.png (821×1 px, 165 KB)

I'm additionally confused by 787503/1. When I click the SonarCloud link I get The requested project does not exist.

sonarcloud.png (821×1 px, 165 KB)

It's because the branch doesn't exist, since the analysis failed. https://sonarcloud.io/dashboard?id=mediawiki-core works, for example.

@Gehel or @hashar might remember this error from when we first set this up. If I recall, there is an issue where data providers in PHPUnit generate the same class/function names in the code coverage report, and then SonarQube gets confused and says "Can not add the same measure twice". I believe we worked around that with a python script in integration/config somewhere but don't remember the details, unfortunately. And I don't know why that would have stopped working suddenly.

kostajh claimed this task.

Seemingly not occurring anymore.