Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-10852

Unable to process analysis report having no sources but project measures

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 6.7.3
    • Fix Version/s: 6.7.5
    • Component/s: Compute Engine
    • Labels:
      None
    • Edition:

      Description

      Step to reproduce:

      • have a Sensor saving a measure like skipped_tests at project level
      • analyze an empty project (no sources)

      This result in error in compute engine:

      org.sonar.server.computation.task.projectanalysis.component.VisitException: Visit failed for Component {key=foo,type=PROJECT} 
      	at org.sonar.server.computation.task.projectanalysis.component.VisitException.rethrowOrWrap(VisitException.java:44)
      	at org.sonar.server.computation.task.projectanalysis.component.PathAwareCrawler.visit(PathAwareCrawler.java:52)
      	at org.sonar.server.computation.task.projectanalysis.step.UnitTestMeasuresStep.execute(UnitTestMeasuresStep.java:74)
      	at org.sonar.server.computation.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:64)
      	at org.sonar.server.computation.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:52)
      	at org.sonar.server.computation.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:75)
      	at org.sonar.ce.taskprocessor.CeWorkerImpl.executeTask(CeWorkerImpl.java:92)
      	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:59)
      	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:35)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.UnsupportedOperationException: a measure can be set only once for a specific Component (key=foo), Metric (key=skipped_tests). Use update method
      	at org.sonar.server.computation.task.projectanalysis.measure.MapBasedRawMeasureRepository.add(MapBasedRawMeasureRepository.java:79)
      	at org.sonar.server.computation.task.projectanalysis.measure.MeasureRepositoryImpl.add(MeasureRepositoryImpl.java:91)
      	at org.sonar.server.computation.task.projectanalysis.formula.FormulaExecutorComponentVisitor.addNewMeasure(FormulaExecutorComponentVisitor.java:181)
      	at org.sonar.server.computation.task.projectanalysis.formula.FormulaExecutorComponentVisitor.processLeaf(FormulaExecutorComponentVisitor.java:167)
      	at org.sonar.server.computation.task.projectanalysis.formula.FormulaExecutorComponentVisitor.process(FormulaExecutorComponentVisitor.java:142)
      	at org.sonar.server.computation.task.projectanalysis.formula.FormulaExecutorComponentVisitor.visitProject(FormulaExecutorComponentVisitor.java:107)
      	at org.sonar.server.computation.task.projectanalysis.component.PathAwareCrawler.visitNode(PathAwareCrawler.java:96)
      	at org.sonar.server.computation.task.projectanalysis.component.PathAwareCrawler.visitImpl(PathAwareCrawler.java:73)
      	at org.sonar.server.computation.task.projectanalysis.component.PathAwareCrawler.visit(PathAwareCrawler.java:50)
      	... 15 more
      

      See attached scanner report.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                julien.lancelot Julien Lancelot
                Reporter:
                julien.henry Julien Henry
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: