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

Issue with secondary location on an unchanged file lead to broken PR or short living branch analysis

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 7.0
    • Fix Version/s: 7.2
    • Component/s: None
    • Labels:
      None
    • Edition:
      Developer
    • Production Notes:
      None

      Description

      Since SONAR-10489 issues are allowed to reference location in a different file. The problem is that in PR or short living branch analysis, only changed files are published in the scanner report.

      So it leads to error on compute engine side like:

      2018.05.24 16:15:15 ERROR ce[AWOSgO-xlOARwruRoJ9Y][o.s.c.t.CeWorkerImpl] Failed to execute task AWOSgO-xlOARwruRoJ9Y
       org.sonar.server.computation.task.projectanalysis.component.VisitException: Visit of Component {key=sample:src/Sample.xoo:BRANCH:test,type=FILE} failed
       	at org.sonar.server.computation.task.projectanalysis.component.VisitException.rethrowOrWrap(VisitException.java:44)
       	at org.sonar.server.computation.task.projectanalysis.component.VisitorsCrawler.visit(VisitorsCrawler.java:74)
       	at org.sonar.server.computation.task.projectanalysis.component.VisitorsCrawler.visitChildren(VisitorsCrawler.java:110)
       	at org.sonar.server.computation.task.projectanalysis.component.VisitorsCrawler.visitImpl(VisitorsCrawler.java:97)
       	at org.sonar.server.computation.task.projectanalysis.component.VisitorsCrawler.visit(VisitorsCrawler.java:72)
       	at org.sonar.server.computation.task.projectanalysis.component.VisitorsCrawler.visitChildren(VisitorsCrawler.java:110)
       	at org.sonar.server.computation.task.projectanalysis.component.VisitorsCrawler.visitImpl(VisitorsCrawler.java:97)
       	at org.sonar.server.computation.task.projectanalysis.component.VisitorsCrawler.visit(VisitorsCrawler.java:72)
       	at org.sonar.server.computation.task.projectanalysis.step.ExecuteVisitorsStep.execute(ExecuteVisitorsStep.java:51)
       	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:73)
       	at org.sonar.ce.taskprocessor.CeWorkerImpl.executeTask(CeWorkerImpl.java:134)
       	at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:97)
       	at org.sonar.ce.taskprocessor.CeWorkerImpl.withCustomizedThreadName(CeWorkerImpl.java:81)
       	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:73)
       	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:43)
       	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:1149)
       	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       	at java.lang.Thread.run(Thread.java:748)
       Caused by: java.lang.IllegalStateException: Fail to process issues of component 'sample:src/Sample.xoo:BRANCH:test'
       	at org.sonar.server.computation.task.projectanalysis.issue.IntegrateIssuesVisitor.visitAny(IntegrateIssuesVisitor.java:70)
       	at org.sonar.server.computation.task.projectanalysis.component.TypeAwareVisitorWrapper.visitAny(TypeAwareVisitorWrapper.java:82)
       	at org.sonar.server.computation.task.projectanalysis.component.VisitorsCrawler.visitNode(VisitorsCrawler.java:117)
       	at org.sonar.server.computation.task.projectanalysis.component.VisitorsCrawler.visitImpl(VisitorsCrawler.java:100)
       	at org.sonar.server.computation.task.projectanalysis.component.VisitorsCrawler.visit(VisitorsCrawler.java:72)
       	... 23 common frames omitted
       Caused by: java.lang.IllegalArgumentException: Component with ref '2' can't be found
       	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)
       	at org.sonar.server.computation.task.projectanalysis.component.TreeRootHolderImpl.getComponentByRef(TreeRootHolderImpl.java:58)
       	at org.sonar.server.computation.task.projectanalysis.issue.TrackerRawInputFactory$RawLazyInput.convertLocation(TrackerRawInputFactory.java:257)
       	at org.sonar.server.computation.task.projectanalysis.issue.TrackerRawInputFactory$RawLazyInput.toIssue(TrackerRawInputFactory.java:172)
       	at org.sonar.server.computation.task.projectanalysis.issue.TrackerRawInputFactory$RawLazyInput.loadIssues(TrackerRawInputFactory.java:114)
       	at org.sonar.core.issue.tracking.LazyInput.getIssues(LazyInput.java:50)
       	at org.sonar.core.issue.tracking.Tracker.track(Tracker.java:30)
       	at org.sonar.server.computation.task.projectanalysis.issue.ShortBranchTrackerExecution.track(ShortBranchTrackerExecution.java:50)
       	at org.sonar.server.computation.task.projectanalysis.issue.IssueTrackingDelegator.track(IssueTrackingDelegator.java:48)
       	at org.sonar.server.computation.task.projectanalysis.issue.IntegrateIssuesVisitor.visitAny(IntegrateIssuesVisitor.java:63)
       	... 27 common frames omitted
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: