You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Sonarqube cannot decorate PR and throws exception
2024.09.26 16:10:30 ERROR ce[7b2f5da9-3e61-4ecd-822a-e30bebb182e0][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Execution of task class com.github.mc1arke.sonarqube.plugin.ce.pullrequest.PullRequestPos
tAnalysisTask failed
java.lang.IllegalStateException: Could not decorate Pull Request on Github
at com.github.mc1arke.sonarqube.plugin.ce.pullrequest.github.GithubPullRequestDecorator.decorateQualityGateStatus(GithubPullRequestDecorator.java:96)
at com.github.mc1arke.sonarqube.plugin.ce.pullrequest.PullRequestPostAnalysisTask.finished(PullRequestPostAnalysisTask.java:139)
at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.executeTask(PostProjectAnalysisTasksExecutor.java:101)
at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.finished(PostProjectAnalysisTasksExecutor.java:92)
at org.sonar.ce.task.step.ComputationStepExecutor.executeListener(ComputationStepExecutor.java:89)
at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:61)
at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:75)
at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:212)
at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:194)
at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:160)
at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:135)
at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:87)
at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:76)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: An error was returned in the response from the Github API:
- Error{message='InputObject 'UpdateCheckRunInput' doesn't accept argument 'headSha'', locations=[Location{line='22', column='11376'}]}
at com.github.mc1arke.sonarqube.plugin.almclient.github.v4.GraphqlGithubClient.executeRequest(GraphqlGithubClient.java:246)
at com.github.mc1arke.sonarqube.plugin.almclient.github.v4.GraphqlGithubClient.reportRemainingAnnotations(GraphqlGithubClient.java:280)
at com.github.mc1arke.sonarqube.plugin.almclient.github.v4.GraphqlGithubClient.createCheckRun(GraphqlGithubClient.java:112)
at com.github.mc1arke.sonarqube.plugin.ce.pullrequest.github.GithubPullRequestDecorator.decorateQualityGateStatus(GithubPullRequestDecorator.java:88)
... 21 common frames omitted
To Reproduce
Steps to reproduce the behavior:
Add new project
Setup github integration
create a PR
Expected behavior
a PR is decorated with analysis results
Software Versions
SonarQube Version: v10.6 (92116) Community edition
Plugin Version: 1.22.0
Additional context
Most projects works fine, only some fails to decorate PR. Not sure what are differencies.
The text was updated successfully, but these errors were encountered:
I suspect this only happens when you have more than 50 findings in a Pull Request, as the additional findings are submitted through UpdateCheckRun, whereas the first 50 are submitted through CreateCheckRun. UpdateCheckRun doesn't take a headSha property, but CreateCheckRun does.
I think I unintentionally broke this during a clean-up in #959 as I couldn't remember why I was setting headSha in an odd way during request building, and none of the test failed when I made the change 🤦 .
Describe the bug
Sonarqube cannot decorate PR and throws exception
To Reproduce
Steps to reproduce the behavior:
Expected behavior
a PR is decorated with analysis results
Software Versions
Additional context
Most projects works fine, only some fails to decorate PR. Not sure what are differencies.
The text was updated successfully, but these errors were encountered: