sonar-stash icon indicating copy to clipboard operation
sonar-stash copied to clipboard

Cannot post a summary comment. Too many characters.

Open kingoleg opened this issue 8 years ago • 4 comments

  1. I have a PR with a lot of new issues (54437/100) because of https://github.com/AmadeusITGroup/sonar-stash/issues/111
build	24-Mar-2017 16:17:26	[WARNING] org.sonarsource.scanner.maven.SonarQubeMojo - 16:17:26.458 Too many issues detected (54437/100): Issues cannot be displayed in Diff view

BTW, this is just a guess. Actually PR consists of only several changed files and all of them are shown in Diff view WIS: There is no summary comment WIE: There is some summary about "Too many issues found. Some of them: bla bla bla"

build	24-Mar-2017 16:17:26	[DEBUG] org.sonarsource.scanner.maven.SonarQubeMojo - 16:17:26.881 Response NettyResponse {
build	24-Mar-2017 16:17:26		statusCode=400
build	24-Mar-2017 16:17:26		headers=
build	24-Mar-2017 16:17:26			Server: nginx
build	24-Mar-2017 16:17:26			Date: Fri, 24 Mar 2017 13:17:26 GMT
build	24-Mar-2017 16:17:26			Content-Type: application/json;charset=UTF-8
build	24-Mar-2017 16:17:26			Transfer-Encoding: chunked
build	24-Mar-2017 16:17:26			Connection: keep-alive
build	24-Mar-2017 16:17:26			X-AREQUESTID: XXX
build	24-Mar-2017 16:17:26			X-ASEN: XXX
build	24-Mar-2017 16:17:26			X-AUSERID: XXX
build	24-Mar-2017 16:17:26			X-AUSERNAME: XXX
build	24-Mar-2017 16:17:26			Cache-Control: no-cache, no-transform
build	24-Mar-2017 16:17:26			Vary: X-AUSERNAME,Accept-Encoding
build	24-Mar-2017 16:17:26			X-Content-Type-Options: nosniff
build	24-Mar-2017 16:17:26		body=
build	24-Mar-2017 16:17:26	{"errors":[{"context":"text","message":"Please enter a non-empty value less than 32768 characters","exceptionName":null}]}
build	24-Mar-2017 16:17:26	}
build	24-Mar-2017 16:17:26	[ERROR] org.sonarsource.scanner.maven.SonarQubeMojo - 16:17:26.906 Unable to push SonarQube analysis overview to Stash
build	24-Mar-2017 16:17:26	org.sonar.plugins.stash.exceptions.StashClientException: Unable to post a comment to mexos #979. Received 400: null: Please enter a non-empty value less than 32768 characters
build	24-Mar-2017 16:17:26		at org.sonar.plugins.stash.client.StashClient.validateResponse(StashClient.java:307) ~[sonar-stash-plugin-1.3.0-SNAPSHOT.jar:na]
build	24-Mar-2017 16:17:26		at org.sonar.plugins.stash.client.StashClient.performRequest(StashClient.java:295) ~[sonar-stash-plugin-1.3.0-SNAPSHOT.jar:na]
build	24-Mar-2017 16:17:26		at org.sonar.plugins.stash.client.StashClient.postCreate(StashClient.java:264) ~[sonar-stash-plugin-1.3.0-SNAPSHOT.jar:na]
build	24-Mar-2017 16:17:26		at org.sonar.plugins.stash.client.StashClient.postCommentOnPullRequest(StashClient.java:99) ~[sonar-stash-plugin-1.3.0-SNAPSHOT.jar:na]
build	24-Mar-2017 16:17:26		at org.sonar.plugins.stash.StashRequestFacade.postAnalysisOverview(StashRequestFacade.java:70) ~[sonar-stash-plugin-1.3.0-SNAPSHOT.jar:na]
build	24-Mar-2017 16:17:26		at org.sonar.plugins.stash.StashIssueReportingPostJob.postInfoAndPRsActions(StashIssueReportingPostJob.java:131) [sonar-stash-plugin-1.3.0-SNAPSHOT.jar:na]
build	24-Mar-2017 16:17:26		at org.sonar.plugins.stash.StashIssueReportingPostJob.updateStashWithSonarInfo(StashIssueReportingPostJob.java:95) [sonar-stash-plugin-1.3.0-SNAPSHOT.jar:na]
build	24-Mar-2017 16:17:26		at org.sonar.plugins.stash.StashIssueReportingPostJob.executeOn(StashIssueReportingPostJob.java:50) [sonar-stash-plugin-1.3.0-SNAPSHOT.jar:na]
build	24-Mar-2017 16:17:26		at org.sonar.batch.phases.PostJobsExecutor.execute(PostJobsExecutor.java:65) [sonar-scanner-engine-shaded-5.6.6.jar:na]
build	24-Mar-2017 16:17:26		at org.sonar.batch.phases.PostJobsExecutor.execute(PostJobsExecutor.java:55) [sonar-scanner-engine-shaded-5.6.6.jar:na]

kingoleg avatar Mar 24 '17 13:03 kingoleg

So I argue that the missing basedir was a misconfiguration in the first place. You should also run your normals scans with this parameter. Then the location of the issues is correct from the beginning and sonar-stash will see only the real new issues.

t-8ch avatar Mar 24 '17 13:03 t-8ch

I guess so. Still this issue is not about missconfiguration.

kingoleg avatar Mar 24 '17 13:03 kingoleg

Yes. I will look at this on monday.

t-8ch avatar Mar 24 '17 13:03 t-8ch

I encountered a similar issue that was not due to misconfiguration. A pull request did in fact introduce several hundred issues (unnecessary parentheses, mostly). All I see is a warning in the build:

WARNING: WARN: Too many issues detected (355/100): Issues cannot be displayed in Diff view

We have the overview comment disabled, but I would still expect something to be added to the PR in this case.

desmondgc avatar Oct 18 '17 12:10 desmondgc