Sonarqube-gradle-plugin: TimeoutException getting diff from Stash

Description

On relatively large diffs (about 3Mb) we get TimeoutException when sonarqube-gradle-plugin tries to GET diff from Stash. There is no way to increase stash connection timeout.
It would be nice to have sonar.stash.timeout property for such cases.

Versions

sonarqube-gradle-plugin v2.8

Error

Unable to push SonarQube report to Stash
org.sonar.plugins.stash.exceptions.StashClientException: https://stash.billing.ru/rest/api/1.0/projects/BSS_CRM/repos/ordering/pull-requests/1859/diff?withComments=true
        at org.sonar.plugins.stash.client.StashClient.performRequest(StashClient.java:345)
        at org.sonar.plugins.stash.client.StashClient.get(StashClient.java:291)
        at org.sonar.plugins.stash.client.StashClient.getPullRequestDiffs(StashClient.java:157)
        at org.sonar.plugins.stash.StashRequestFacade.getPullRequestDiffReport(StashRequestFacade.java:347)
...
Caused by: java.util.concurrent.TimeoutException: null
        at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1886)
        at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2021)
        at org.asynchttpclient.netty.NettyResponseFuture.get(NettyResponseFuture.java:206)
        at org.sonar.plugins.stash.client.StashClient.performRequest(StashClient.java:340)
        ... 132 common frames omitted
``

Hi,

Welcome to the community!

This error is coming from a 3rd-party plugin not (AFAIK) known or supported here. You should contact the maintainers of the Stash plugin.

 
HTH,
Ann

Hi!

According to plugin page it is owned by SonarSource. Unfortunately I didn’t find any other information on the plugin. I will try searching through Gradle forums.

Thank you for prompt reply.

Hi,

Yes, the Gradle analyzer is owned by SonarSource. Your error is coming from the 3rd-party Stash plugin installed on your server (emphasis mine):

 
Ann

Ahh, now I see :wink:
Thanks for pointing this out.
It led me to the solution - sonar.stash.timeout property described here.