Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Plugin can be installed on not supported Sonar versions #152

Closed
lst85 opened this issue Dec 20, 2021 · 8 comments · Fixed by #153
Closed

Plugin can be installed on not supported Sonar versions #152

lst85 opened this issue Dec 20, 2021 · 8 comments · Fixed by #153

Comments

@lst85
Copy link

lst85 commented Dec 20, 2021

Hi,

We are using Sonar 8.9.1 (build 44547) and detekt plugin 2.3.0.
In the marketplace I saw that there is an update available for the detekt plugin to version 2.4.0.
After installing the update Sonar no longer starts.
In the web.log file I can see the following line:
Web server startup failed: Plugin detekt [detekt] requires at least SonarQube 9.1.0.47736

Is there a way to prevent installing 2.4.0 via the marketplace on Sonar versions that are not supported?
In addition to that the README.md file says that the detekt plugin "Supports SonarQube 7.9.3+".

Side node: We would love to use the 2.4.0 version of the detekt plugin. However, updating Sonar is a major task because the Sonar installation is used company wide by a lot of projects. Is there any chance to get 2.4.0 running in Sonar 8.x?

@EHEX-schildt
Copy link

Same on latest LTS 8.9.6

@cortinico
Copy link
Member

I'm afraid we would need someone with deeper understanding of SonarQube dependencies to pin point the problem here.

The version 2.4.0 of sonar-kotlin was released some months ago, with support for Detekt 1.18.x. I've update the information for the Sonar Update Center here: SonarSource/sonar-update-center-properties#250 (comment)

In addition to that the README.md file says that the detekt plugin "Supports SonarQube 7.9.3+".

I believe that's still the case. The fact that SonarQube is preventing you to install the plugin is not necessarily a problem of this plugin.

Is there any chance to get 2.4.0 running in Sonar 8.x?

I believe it should work with 8.x as we declared 2.4.0.sqVersions=[8.9,LATEST]. Maybe you can open a thread on Sonar's forum and ask for further support?

@lst85
Copy link
Author

lst85 commented Jan 3, 2022

I think the problem is the Sonar API version in the Maven POM.
detekt plugin 2.4.0 uses API version 9.1.0.47736:
https://github.com/detekt/sonar-kotlin/blob/05f4c337bfb2b43fb1c15780da5bf5926960987d/pom.xml#L25
detekt plugin 2.3.0 uses API version 7.9.4:
https://github.com/detekt/sonar-kotlin/blob/b8fd862bf159a263923b76ce6dd408037f5bb7e0/pom.xml#L25

@cortinico
Copy link
Member

I think the problem is the Sonar API version in the Maven POM.

I'm unsure how the Sonar API bump are treated.
I was under the assumption that we could bump the Sonar API and declare on the store the supported version of SonarQube we support. Seems like this is not the case (i.e. the POM file is effectively inspected at install time)?

Do you have some documentation on this front?

If this is the case, we would have to downgrade Sonar API to 8.x and release a newer version.

@lst85
Copy link
Author

lst85 commented Jan 3, 2022

https://docs.sonarqube.org/latest/extend/developing-plugin/

Minimal version of supported SonarQube at runtime. For example if value is 5.2, then deploying the plugin on versions 5.1 and lower will fail. Default value is given by the version of sonar-plugin-api dependency. It can be overridden with the Maven property sonarQubeMinVersion (since sonar-packaging-maven-plugin 1.16).

@cortinico
Copy link
Member

This should address the issue #153

@cortinico
Copy link
Member

This should be solved by now with 2.5.0 being on the marketplace

@lst85
Copy link
Author

lst85 commented Jan 21, 2022

Thank you! :)

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

Successfully merging a pull request may close this issue.

3 participants