[Bug] Sonar-GitHub Plugin not working with commit statuses longer than int

337 views
Skip to first unread message

iss...@gmail.com

unread,
Nov 1, 2017, 12:08:19 PM11/1/17
to SonarQube
Hi! 

The Sonar-GitHub plugin that submits a status (using GitHub Status API) on a Pull Request is not working. I got the following stack trace:

at org.kohsuke.github.Requester.parse(Requester.java:522)

... 84 more

Caused by: com.fasterxml.jackson.databind.JsonMappingException: Numeric value (4296900259) out of range of int

 at [Source: java.io.StringReader@7ee3a2ed; line: 1, column: 170] (through reference chain: org.kohsuke.github.GHCommitStatus["id"])

at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:232)

at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:197)

at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.wrapAndThrow(BeanDeserializerBase.java:1311)

at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:297)

at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:121)

at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:151)

at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:18)

at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2888)

at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2034)

at org.kohsuke.github.Requester.parse(Requester.java:520)

... 84 more

Caused by: com.fasterxml.jackson.core.JsonParseException: Numeric value (4296900259) out of range of int

 at [Source: java.io.StringReader@7ee3a2ed; line: 1, column: 170]

at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1369)

at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:532)

at com.fasterxml.jackson.core.base.ParserBase.convertNumberToInt(ParserBase.java:847)

at com.fasterxml.jackson.core.base.ParserBase.getIntValue(ParserBase.java:643)

at com.fasterxml.jackson.databind.deser.std.StdDeserializer._parseInteger(StdDeserializer.java:306)

at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$IntegerDeserializer.deserialize(NumberDeserializers.java:319)

at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$IntegerDeserializer.deserialize(NumberDeserializers.java:301)

at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:464)

at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:107)

at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:295)

... 90 more


It turns out that GitHub's status ID's are now longer than an int which is causing the plugin to fail. I traced this back to the github-api plugin where they recently changed this 'int' to 'long' in v1.90. This plugin should upgrade to v1.90 of the github-api plugin (today it is at 1.76).


Thanks,
Isaac

G. Ann Campbell

unread,
Nov 1, 2017, 3:06:54 PM11/1/17
to SonarQube
Hi Isaac,

Thanks for your thorough report. That's this issue, which has been fixed in v1.4.2, which should be available soon.


Ann

ricardo....@acklenavenue.com

unread,
Nov 2, 2017, 2:30:18 PM11/2/17
to SonarQube
Hello, everyone, first time posting here. We were doing some tests with the sonarcube Github plugin today, and we ran into the same problems.

I was going to post about it  too, when I noticed the repo already had the fix, but no release yet. In the Jira post Julien says that if all goes well it will be released on Monday. Any way in which we might be notified of the release? Thanks beforehand.

G. Ann Campbell

unread,
Nov 2, 2017, 2:50:20 PM11/2/17
to ricardo....@acklenavenue.com, SonarQube
Hi,

Releases are typically announced in this list, but in any case, your SonarQube administrator will see the availability of a plugin upgrade in Administration > System > Update Center.


Ann



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/2RpOwd3F7sM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/0794e096-3fba-4328-8816-63f450fe4412%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ricardo A. Interiano (Raim)

unread,
Nov 2, 2017, 2:52:59 PM11/2/17
to SonarQube
Understood. Thank you, Ann.
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.

Raphaël DUCOM

unread,
Nov 2, 2017, 4:37:45 PM11/2/17
to SonarQube
Hi the sonar team !

Is it possible to publish a pre-release of 1.4.2 tomorrow (03/11) ?

This issue is really a big blocker on our side ...

Thanks in advance,

Bests,

Raphaël

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/6bbab453-a8ee-4c9d-a993-3532702c8554%40googlegroups.com.

phoen...@gmail.com

unread,
Nov 2, 2017, 6:04:21 PM11/2/17
to SonarQube
Hi,

Will this also fix this issue for sonar-maven-plugin?

Thanks

G. Ann Campbell

unread,
Nov 3, 2017, 7:35:10 AM11/3/17
to SonarQube
Hi,

@Raphael, check the comment log on the ticket I linked.

@phoenixdnlm, not if it's truly SonarQube Scanner for Maven that's broken. What are your symptoms?


Ann

phoen...@gmail.com

unread,
Nov 3, 2017, 2:04:01 PM11/3/17
to SonarQube
Hi Ann,

Here is the error we are seeing.
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.2:sonar (default-cli) on project core-services:
Unable to load component class org.sonar.batch.scan.ImmutableProjectReactor: org.kohsuke.github.HttpException:
Server returned HTTP response code: 200, message: 'OK' for URL: https://api.github.com/repos/<REPOSITORYURL>:
Failed to deserialize.....Numeric value (4299323808) out of range of int
[ERROR] at [Source: java.io.StringReader@3dd916d9; line: 1, column: 128] (through reference chain: org.kohsuke.github.GHCommitStatus["id"])

G. Ann Campbell

unread,
Nov 3, 2017, 2:06:18 PM11/3/17
to SonarQube
Hi,

This error isn't coming from SonarQube Scanner for Maven but from PR analysis. The update to that plugin should fix it.


Ann

Tim McNally

unread,
Nov 3, 2017, 2:40:04 PM11/3/17
to SonarQube
Hi,

I built 1.4.2 of the Github plugin and verified that it does fix the issues we were seeing.

Thank you.

G. Ann Campbell

unread,
Nov 3, 2017, 2:45:58 PM11/3/17
to Tim McNally, SonarQube
Hi,

Thanks for the feedback and confirmation!


Ann



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/2RpOwd3F7sM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/922d25bc-9d84-46eb-a2b4-e211db1a1e08%40googlegroups.com.

dab...@gmail.com

unread,
Nov 8, 2017, 11:13:34 AM11/8/17
to SonarQube
Is it possible, that this fix needs to be forwarded to the sonar-scanner-jenkins plugin as well? 

We are using:
sonar-scanner-jenkins 2.6.1
github-api 1.90

But we are facing the same issues. So I kinda have the feeling that sonar-scanner-jenkins is using its own version of github-api?! I couldn't find anything in the code though 

Kr
Stefan
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.

apu...@redhat.com

unread,
Nov 8, 2017, 11:55:32 AM11/8/17
to SonarQube
Hi,

have you upgraded the sonar-github-plugin on your Sonar server instance?

dab...@gmail.com

unread,
Nov 9, 2017, 4:05:14 AM11/9/17
to SonarQube
Ah, I see were my mistake is now. Got confused why a sonar plugin has a reference to a jenkins plugin. 

Sadly it looks like the update is not yet available in the sonar update center. Is there any timeframe when this will be available? 

multi...@gmail.com

unread,
Nov 9, 2017, 10:45:57 AM11/9/17
to SonarQube
The 1.4.2 update is available in the update center but it is pointing to the 1.4.1.822 plugin version.  Upgrading does nothing.  When complete, the 1.4.2 plugin is still listed as pending an update.

Raphaël DUCOM

unread,
Nov 10, 2017, 3:56:35 AM11/10/17
to SonarQube
https://sonarcloud.io is impacted by this issue
Do you have an ETA for the update of github plugin on sonarcloud.io ?

Many thanks !

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/198a9652-40c0-4477-96c2-27aa2b3760ff%40googlegroups.com.

apu...@redhat.com

unread,
Nov 13, 2017, 9:31:32 AM11/13/17
to SonarQube
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.

matt.e...@gmail.com

unread,
Dec 7, 2017, 11:21:29 AM12/7/17
to SonarQube
How do I access the GitHub plugin on SonarCloud.io?  Can't seem to find any of the plugins.

Matt
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.

G. Ann Campbell

unread,
Dec 7, 2017, 11:39:41 AM12/7/17
to matt.e...@gmail.com, SonarQube
Hi Matt,

What do you mean 'access'? You're not going to be able to get to the list of installed plugins. Are you just trying to verify that plugin has been updated? Are you still having a problem?


Ann 



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/0d8ecc6f-065e-40f3-b8cb-17f9141e642d%40googlegroups.com.

G. Ann Campbell

unread,
Dec 7, 2017, 1:00:56 PM12/7/17
to Matt Moore, SonarQube
Hi Matt,

Please remember to include the Google Group in your replies. 

To use the plugin you just... use it. Check the documentation to see how to do that.


Ann 



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

On Thu, Dec 7, 2017 at 12:23 PM, Matt Moore <matt.e...@gmail.com> wrote:
Perhaps I’m missing something. How do I go about using the plugin?

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages