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

Plugin incompatibility with newer Sonar versions #95

Open
harrysingh opened this issue Mar 15, 2021 · 3 comments
Open

Plugin incompatibility with newer Sonar versions #95

harrysingh opened this issue Mar 15, 2021 · 3 comments
Labels

Comments

@harrysingh
Copy link

harrysingh commented Mar 15, 2021

Version report

2.1.1

Jenkins and plugins versions report:

Jenkins: 2.2.49.2
Sonar: 8.4.1
  • What Operating System are you using (both controller, and any agents involved in the problem)?
Linux 3.10.0-1127.19.1.el7.x86_64

Reproduction steps

Setup Publish of coverage using plugin

Results

Expected result:

It should be able to find the master coverage from Sonar

Actual result:

The API used to search for projects is /api/projects/index?search= which is no longer supported by sonar. The plugin fails to find the master coverage from sonar.

{
  "errors": [
    {
      "msg": "Unknown url : /api/projects/index"
    }
  ]
}

Jenkins output

00:23:28  [GitHub PR Status] start
00:23:28  [GitHub PR Status] getting master coverage...
00:23:28  take master coverage from sonar by token
00:23:29  Getting coverage for Git Repo URL: <git repo path> by repo name: <git project name>
00:23:29  Failed to get master coverage for <git repo path>
00:23:29  Exception message 'com.github.terma.jenkins.githubprcoveragestatus.SonarMasterCoverageRepository$SonarProjectRetrievalException: failed to search for sonar project <git project name> - Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
00:23:29   at [Source: (org.apache.commons.httpclient.AutoCloseInputStream); line: 1, column: 2]'
00:23:29  com.github.terma.jenkins.githubprcoveragestatus.SonarMasterCoverageRepository$SonarProjectRetrievalException: failed to search for sonar project profile-diagnostics - Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
@harrysingh harrysingh added the bug label Mar 15, 2021
@harrysingh
Copy link
Author

harrysingh commented Mar 15, 2021

@tburow @maxr-jidol Can you please help review this?

@maxr-jidol
Copy link

👍

@tburow
Copy link

tburow commented Mar 15, 2021

@tburow @maxr-jidol Can you please help review this?

try building this branch locally and see if it resolves your issue - theres no active maintainers on this plugin anymore as far as I know. I used this locally and it fixed my issue. - I think you will need to move over to the checks-api, this plugin is more or less deprecated.

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

No branches or pull requests

3 participants