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

Add more information when changeset is invalid

    Details

      Description

      When a changeset on a line is invalid, the analysis is currently failing in the compute engine like this :

      2015.12.03 05:43:41 ERROR [o.s.s.c.t.CeWorkerRunnableImpl] Failed to execute task AVFoFXr4tOKYAdi2XmBQ
      java.lang.IllegalStateException: Changeset must have a date
              at com.google.common.base.Preconditions.checkState(Preconditions.java:176) ~[guava-17.0.jar:na]
              at org.sonar.server.computation.scm.ReportScmInfo.convert(ReportScmInfo.java:56) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.scm.ReportScmInfo.access$100(ReportScmInfo.java:40) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.scm.ReportScmInfo$LineIndexToChangeset.apply(ReportScmInfo.java:100) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.scm.ReportScmInfo$LineIndexToChangeset.apply(ReportScmInfo.java:84) ~[sonar-server-5.2.jar:na]
              at com.google.common.collect.Iterators$8.transform(Iterators.java:794) ~[guava-17.0.jar:na]
              at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48) ~[guava-17.0.jar:na]
              at com.google.common.collect.Iterators$7.computeNext(Iterators.java:646) ~[guava-17.0.jar:na]
              at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-17.0.jar:na]
              at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-17.0.jar:na]
              at com.google.common.collect.Iterators.addAll(Iterators.java:356) ~[guava-17.0.jar:na]
              at com.google.common.collect.Lists.newArrayList(Lists.java:147) ~[guava-17.0.jar:na]
              at com.google.common.collect.Iterables.toCollection(Iterables.java:337) ~[guava-17.0.jar:na]
              at com.google.common.collect.Iterables.toArray(Iterables.java:315) ~[guava-17.0.jar:na]
              at com.google.common.collect.FluentIterable.toArray(FluentIterable.java:436) ~[guava-17.0.jar:na]
              at org.sonar.server.computation.scm.ScmInfoImpl.<init>(ScmInfoImpl.java:43) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.scm.ReportScmInfo.convertToScmInfo(ReportScmInfo.java:49) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.scm.ReportScmInfo.<init>(ReportScmInfo.java:45) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.scm.ScmInfoRepositoryImpl.getScmInfoFromReport(ScmInfoRepositoryImpl.java:103) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.scm.ScmInfoRepositoryImpl.getScmInfoForComponent(ScmInfoRepositoryImpl.java:80) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.scm.ScmInfoRepositoryImpl.initializeScmInfoForComponent(ScmInfoRepositoryImpl.java:67) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.scm.ScmInfoRepositoryImpl.getScmInfo(ScmInfoRepositoryImpl.java:59) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.step.NewCoverageMeasuresStep$NewCoverageCounter.initialize(NewCoverageMeasuresStep.java:371) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.formula.FormulaExecutorComponentVisitor.processLeaf(FormulaExecutorComponentVisitor.java:165) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.formula.FormulaExecutorComponentVisitor.process(FormulaExecutorComponentVisitor.java:142) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.formula.FormulaExecutorComponentVisitor.visitFile(FormulaExecutorComponentVisitor.java:122) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.component.PathAwareCrawler.visitNode(PathAwareCrawler.java:89) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.component.PathAwareCrawler.visit(PathAwareCrawler.java:57) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.component.PathAwareCrawler.visitChildren(PathAwareCrawler.java:71) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.component.PathAwareCrawler.visit(PathAwareCrawler.java:54) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.component.PathAwareCrawler.visitChildren(PathAwareCrawler.java:71) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.component.PathAwareCrawler.visit(PathAwareCrawler.java:54) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.component.PathAwareCrawler.visitChildren(PathAwareCrawler.java:71) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.component.PathAwareCrawler.visit(PathAwareCrawler.java:54) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.component.PathAwareCrawler.visitChildren(PathAwareCrawler.java:71) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.component.PathAwareCrawler.visit(PathAwareCrawler.java:54) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.component.PathAwareCrawler.visitChildren(PathAwareCrawler.java:71) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.component.PathAwareCrawler.visit(PathAwareCrawler.java:54) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.step.NewCoverageMeasuresStep.execute(NewCoverageMeasuresStep.java:113) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:39) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.taskprocessor.report.ReportTaskProcessor.process(ReportTaskProcessor.java:53) ~[sonar-server-5.2.jar:na]
              at org.sonar.server.computation.taskprocessor.CeWorkerRunnableImpl.executeTask(CeWorkerRunnableImpl.java:78) [sonar-server-5.2.jar:na]
              at org.sonar.server.computation.taskprocessor.CeWorkerRunnableImpl.run(CeWorkerRunnableImpl.java:55) [sonar-server-5.2.jar:na]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_67]
              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) [na:1.7.0_67]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_67]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.7.0_67]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_67]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_67]
              at java.lang.Thread.run(Thread.java:745) [na:1.7.0_67]
      

      We have not enough information to investigate. Thanks to https://jira.sonarsource.com/browse/SONAR-6997 we'll have the component key, but we also need the line number.

      Moreover it would also be great to fail on scanner side, as it'll probably be possible to have more information of what happen.

        Attachments

          Activity

            People

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

              Dates

              • Due:
                Created:
                Updated:
                Resolved: