Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to run SonarQube analysis in Teamcity results in error #41

Closed
akuryan opened this issue Nov 14, 2017 · 8 comments
Closed

Trying to run SonarQube analysis in Teamcity results in error #41

akuryan opened this issue Nov 14, 2017 · 8 comments

Comments

@akuryan
Copy link

akuryan commented Nov 14, 2017

It seems that plugin is not able to swallow status ID. I shall note that this error happens on PR analysis on only one of our projects - so, maybe it is some boundary issue

[Step 7/7] ERROR: Error during Sonar runner execution

[10:52:38][Step 7/7] ERROR: Unable to execute Sonar

[10:52:38][Step 7/7] ERROR: Caused by: Unable to load component class org.sonar.batch.scan.ImmutableProjectReactor

[10:52:38][Step 7/7] ERROR: Caused by: Unable to update commit status

[10:52:38][Step 7/7] ERROR: Caused by: Server returned HTTP response code: 201, message: 'Created' for URL: https://api.github.com/repos/organizationName/repoName/statuses/2648c30d6e3c74045240d84bfd30b8cb7096e173

[10:52:38][Step 7/7] ERROR: Caused by: Failed to deserialize {"url":"https://api.github.com/repos/organizationName/repoName/statuses/2648c30d6e3c74045240d84bfd30b8cb7096e173","id":4314163357,"state":"pending","description":"SonarQube analysis in progress","target_url":null,"context":"sonarqube","created_at":"2017-11-14T09:52:37Z","updated_at":"2017-11-14T09:52:37Z","creator":{"login":"sonarqube-repoName","id":31036991,"avatar_url":"https://avatars1.githubusercontent.com/u/31036991?v=4","gravatar_id":"","url":"https://api.github.com/users/someUserName","html_url":"https://github.com/sonarqube-repoName","followers_url":"https://api.github.com/users/someUserName/followers","following_url":"https://api.github.com/users/someUserName/following{/other_user}","gists_url":"https://api.github.com/users/someUserName/gists{/gist_id}","starred_url":"https://api.github.com/users/someUserName/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/someUserName/subscriptions","organizations_url":"https://api.github.com/users/someUserName/orgs","repos_url":"https://api.github.com/users/someUserName/repos","events_url":"https://api.github.com/users/someUserName/events{/privacy}","received_events_url":"https://api.github.com/users/someUserName/received_events","type":"User","site_admin":false}}

[10:52:38][Step 7/7] ERROR: Caused by: Numeric value (4314163357) out of range of int

[10:52:38][Step 7/7]  at [Source: java.io.StringReader@1e8823d2; line: 1, column: 119] (through reference chain: org.kohsuke.github.GHCommitStatus["id"])

[10:52:38][Step 7/7] ERROR: Caused by: Numeric value (4314163357) out of range of int

[10:52:38][Step 7/7]  at [Source: java.io.StringReader@1e8823d2; line: 1, column: 119]

[10:52:38][Step 7/7] ERROR: 

[10:52:38][Step 7/7] ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.

[10:52:38][Step 7/7] ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
@Linfar
Copy link
Member

Linfar commented Nov 14, 2017

ERROR: Caused by: Numeric value (4314163357) out of range of int.
wow!

Does this error occur in TeamCity build only or when you run the analysis manually as well?

As I understand the error is raised in some github with SonarQube integration. I suppose this is some plugin - please check whether you can upgrade it.

@akuryan
Copy link
Author

akuryan commented Nov 15, 2017

It is this SonarQube plugin, running on Teamcity side to analyze PR. Or is there something invoked on SQ side as well at this point?

@Linfar
Copy link
Member

Linfar commented Nov 15, 2017

I mean when you are running analysis manually from command line - does this error occur?

@akuryan
Copy link
Author

akuryan commented Nov 15, 2017

I am not sure how to launch PR analysis manually :(

@akuryan
Copy link
Author

akuryan commented Nov 15, 2017

I found string for execution from log output - and started it manually
I received same result

@akuryan
Copy link
Author

akuryan commented Nov 15, 2017

It seems that the problem is on https://github.com/kohsuke/github-api:
at org.kohsuke.github.Requester.parse(Requester.java:522)
... 65 more
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Numeric value (4314789267) out of range of int
at [Source: java.io.StringReader@75201592; line: 1, column: 120] (through reference chain: org.kohsuke.github.GHCommitStatus["id"])

After googling - I found https://github.com/kohsuke/github-api
But I am not sure - where error pops up: on Teamcity level or on SQ level :(

@Linfar
Copy link
Member

Linfar commented Nov 16, 2017

Yeah, and it seems they've fixed this issue 2 weeks ago: hub4j/github-api#393.

Here is fix in SonarQube integration for github: SonarSource/sonar-github@0aacae3#diff-600376dffeb79835ede4a0b285078036

So you'll need to update SonarQube GitHub Plugin on your SonarQube Server. I don't know whether they've released it already

@akuryan
Copy link
Author

akuryan commented Nov 16, 2017

Updating sonar-github plugin fixed issue. Thank you for your help

@akuryan akuryan closed this as completed Nov 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants