Skip to content
This repository has been archived by the owner on Jan 7, 2021. It is now read-only.

Unable to push SonarQube analysis overview to Stash #188

Open
BattleLoot opened this issue Jul 11, 2018 · 1 comment
Open

Unable to push SonarQube analysis overview to Stash #188

BattleLoot opened this issue Jul 11, 2018 · 1 comment

Comments

@BattleLoot
Copy link

Hi Everyone,

I got next error when I tried to analyze my Hybris extensions:

Sonar 6.7.3
Jenkins 2.121.1
BitBucket 4.13.0
sonar-stash plugin 1.4.0

12:47:15 12:47:15.313 DEBUG: Using open Channel [id: 0x367c05d0, L:/10.17.221.17:44688 - R:/10.17.221.104:7990] for POST '/rest/api/1.0/projects/MyProjects/repos/MyRepo/pull-requests/4/comments'
12:47:15 12:47:15.490 DEBUG: 
12:47:15 
12:47:15 Request DefaultFullHttpRequest(decodeResult: success, version: HTTP/1.1, content: SlicedAbstractByteBuf(freed))
12:47:15 POST /rest/api/1.0/projects/MyProjects/repos/MyRepo/pull-requests/4/comments HTTP/1.1
12:47:15 Content-Type: application/json
12:47:15 Accept: application/json
12:47:15 Content-Length: 83282
12:47:15 Host: IP:7990
12:47:15 Authorization: Basic
12:47:15 User-Agent: SonarQube/6.7.3.38370 Stash/1.4.0-SNAPSHOT AHC/2.0
12:47:15 
12:47:15 Response DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
12:47:15 HTTP/1.1 400 Bad Request
12:47:15 Server: Apache-Coyote/1.1
12:47:15 X-AREQUESTID: @Q2L54Mx587x69482x0
12:47:15 X-ASEN: SEN-L11963680
12:47:15 X-AUSERID: 2
12:47:15 X-AUSERNAME: SonarQube
12:47:15 Cache-Control: no-cache, no-transform
12:47:15 Vary: X-AUSERNAME,Accept-Encoding
12:47:15 Transfer-Encoding: chunked
12:47:15 Content-Type: application/json;charset=UTF-8
12:47:15 X-Content-Type-Options: nosniff
12:47:15 Date: Wed, 11 Jul 2018 09:47:14 GMT
12:47:15 Connection: close
12:47:15 
12:47:15 12:47:15.490 DEBUG: Closing Channel [id: 0x367c05d0, L:/10.17.221.17:44688 - R:/10.17.221.104:7990] 
12:47:15 12:47:15.491 DEBUG: Channel Closed: [id: 0x367c05d0, L:/10.17.221.17:44688 ! R:/10.17.221.104:7990] with attribute INSTANCE
12:47:15 12:47:15.494 ERROR: Unable to push SonarQube analysis overview to Stash
12:47:15 org.sonar.plugins.stash.exceptions.StashClientException: Unable to post a comment to MyRepo #4. Received 400: null: Please enter a non-empty value less than 32768 characters
12:47:15 	at org.sonar.plugins.stash.client.StashClient.validateResponse(StashClient.java:379)
12:47:15 	at org.sonar.plugins.stash.client.StashClient.performRequest(StashClient.java:363)
12:47:15 	at org.sonar.plugins.stash.client.StashClient.postCreate(StashClient.java:318)
12:47:15 	at org.sonar.plugins.stash.client.StashClient.postCommentOnPullRequest(StashClient.java:111)
12:47:15 	at org.sonar.plugins.stash.StashRequestFacade.postAnalysisOverview(StashRequestFacade.java:69)
12:47:15 	at org.sonar.plugins.stash.StashIssueReportingPostJob.postInfoAndPRsActions(StashIssueReportingPostJob.java:138)
12:47:15 	at org.sonar.plugins.stash.StashIssueReportingPostJob.updateStashWithSonarInfo(StashIssueReportingPostJob.java:105)
12:47:15 	at org.sonar.plugins.stash.StashIssueReportingPostJob.execute(StashIssueReportingPostJob.java:58)
12:47:15 	at org.sonar.scanner.postjob.PostJobWrapper.executeOn(PostJobWrapper.java:58)
12:47:15 	at org.sonar.scanner.phases.PostJobsExecutor.execute(PostJobsExecutor.java:66)
12:47:15 	at org.sonar.scanner.phases.PostJobsExecutor.execute(PostJobsExecutor.java:55)
12:47:15 	at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:94)
12:47:15 	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:180)
12:47:15 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
12:47:15 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
12:47:15 	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:288)
12:47:15 	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:283)
12:47:15 	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:261)
12:47:15 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
12:47:15 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
12:47:15 	at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
12:47:15 	at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
12:47:15 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
12:47:15 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
12:47:15 	at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)
12:47:15 	at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
12:47:15 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:71)
12:47:15 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
12:47:15 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:47:15 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
12:47:15 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
12:47:15 	at java.lang.reflect.Method.invoke(Method.java:498)
12:47:15 	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
12:47:15 	at com.sun.proxy.$Proxy0.execute(Unknown Source)
12:47:15 	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:171)
12:47:15 	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:128)
12:47:15 	at org.sonarsource.scanner.cli.Main.execute(Main.java:111)
12:47:15 	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
12:47:15 	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
@t-8ch
Copy link
Contributor

t-8ch commented Jul 19, 2018

Hi @BattleLoot ,
Bitbucket rejects the report because it is too large. We should probably push multiple comments and have a sane cutoff to not swamp the PR with comments.

The reason your report is this large could be because you forgot to perform a full analysis, so every issue is reported on the PR. Could you doublecheck this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants