-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
#753: Add support for Sonarqube 10.0 #754
Conversation
94dd33b
to
17d0c0f
Compare
Sonarqube 10 has removed legacy support for modules as well as removing deprecated properties historically used for specifying branch targets. Additionally, the interface for managing Sonarqube features has had a method renamed, which makes the new version of Sonarqube binary incompatible with the plugin. The references to Sonarqube's removed code have been removed from the plugin, and the implementations of the interface and Java agent that dynamically updates Sonarqube code that also implements the interface have been updated to use the new method name. As the Sonarqube server binaries are now compiled against Java 17, the build process has been bumped to JDK 17, but continues to produce Java 11 artefacts to allow scanner components to be compatible with the ongoing Java 11 support in the scanner.
17d0c0f
to
ebe6388
Compare
Kudos, SonarCloud Quality Gate passed! |
I'm unable to compile. |
@Ixiodor no errors - no help. |
when will the image be pushed to dockerhub ? |
errors.txt |
I was able to reproduce @Ixiodor's issue by building the Dockerfile included in the repository. It looks like most of these errors seem are caused by a mismatch between Java versions, where Java 17 is expected but Java 11 is used. To fix this, I suggest:
|
Hi there, Any chance to release it? |
Tested it, works well with SonarQube Server 10.0.0. |
👋🏼 any chance we can get that released this upcoming week? |
If you're interested in using the plugin, it can be downloaded from the provided URL, but please note that it is not an official plugin and should be used at your own risk. https://ipfs.obiwan.xyz/ipfs/QmXS3BhVpigNhMUBHnFkKn9X4hXyPJBwDLMrT2kp7Txecd/sonarqube-community-branch-plugin-1.15.0-SNAPSHOT.jar |
Hi please note that thanks to GitHub Actions, you can download the generated artefact of this PR directly from GitHub Checks pages:
It needs a little time to get use to the Checks display and layout, but then you can grab a lot of interesting things 😉 No need to use a custom build artefact from another source. |
Could this possibly cause issues with the analyzer from differentiating between new code and the entire code base? |
Okay to me it seems they added a new code feature now that changes what code gets checked as new and for us it seems it causes critical issues to always fail no matter how we set our gates. But maybe it is a different thing within 10 I am missing, but my suspicion is maybe the API is different for this slightly. |
I managed to build this branch successfuly with the |
@mc1arke any chance we get a date about the released ? 🙏 |
I have upgraded from version 9.7.1 to version 10 of SonarQube. I also updated the sonarqube-community-branch-plugin to version 1.14.0. I made the necessary changes in the sonar.properties file. However, after logging in, I'm experiencing an endless loading of SonarQube. In the logs, I see the following error: 12:54:55.516 [main] INFO com.github.mc1arke.sonarqube.plugin.CommunityBranchAgent - Loading agent Java version: 17 |
This plugin (latest version 1.14.0) does not work yet with SonarQube 10. Snapshot version from this PR can be downloaded from here: https://github.com/mc1arke/sonarqube-community-branch-plugin/suites/12099751315/artifacts/637297350 This is the purpose of this PR to add support for SonarQube 10. Looking forward to get this merged soon 🤞 |
I think it is too early to merge due to the lack of branches support now. PR works, and SQ has separated analysis for those, but when you build a non master branch, all results still go to the master's one. |
Do you have details I can use to replicate this? The point of this PR sitting open for a while is to gather feedback, and I've not seen any reports from anyone about this issue. The branch scanning functionality is one of the standard features the plugin has supported in all previous versions and doesn't appear to be something that Sonarsource have changed the operations for. |
The update after some internal investigation: Azure DevOps recognizes the type of SQ and has stopped passing the sonar.branch.name property with SQ 10 Community Edition. And the fix is to use SQ extensions v5+, because v4 doesn't recognize the SQ version correctly and decides that it doesn't support branch analysis. So no issues with the plugin there, thank you:)! |
Looking swish on github :) If helpful, this is the Dockerfile I used along with the snapshot from the artefact: FROM sonarqube:latest
ENV PLUGIN_VERSION=1.15.0-SNAPSHOT
ADD --chown=sonarqube:sonarqube sonarqube-community-branch-plugin-*.jar /opt/sonarqube/extensions/plugins/
ENV SONAR_WEB_JAVAADDITIONALOPTS="-javaagent:./extensions/plugins/sonarqube-community-branch-plugin-${PLUGIN_VERSION}.jar=web"
ENV SONAR_CE_JAVAADDITIONALOPTS="-javaagent:./extensions/plugins/sonarqube-community-branch-plugin-${PLUGIN_VERSION}.jar=ce" |
tested it with gitlab 16 and sonarqube 10.0. Works perfectly 👍 |
For some reason all my PRs are passing the quality gate and they aren't showing the number of bugs or anything, but the same code in the main branch is showing the bugs, why is it so? Is my New Code configuration wrong or is it some issue with the plugin? I'm not able to see go to PR button next to the branch drop down too. Thanks. |
seems to work in version 10.0.0 but not in 10.1.0 |
Any news for |
Hi team, The docker image of the version 10.0 community use the Sonarqube version 10.1.0.73491 but this PR need the version 10.0.0.68432: https://github.com/mc1arke/sonarqube-community-branch-plugin/blob/feature/sonarqube-10_0-support/build.gradle#L43 You need download the Dockerfile and entrypoint.sh of Sonarqube repository and edit this paramenter for use this PR build: https://github.com/SonarSource/docker-sonarqube/blob/9b79d014844155923673ca1fbe72ecc0d9ff361c/10/community/Dockerfile#L12 Also, replace the last line with ENTRYPOINT ["/bin/bash", "/opt/sonarqube/docker/entrypoint.sh"] |
hope it can help you. #786 |
based on the branch: feature/sonarqube-10_0-support 1. upgrade sonarqubeVersion to '10.0.0.68432' 2. fixed dbClient.componentDao().insert(DbSession session, ComponentDto item, boolean isMainBranch) 3. fixed UT code
based on the branch: feature/sonarqube-10_0-support 1. upgrade sonarqubeVersion to '10.0.0.68432' 2. fixed dbClient.componentDao().insert(DbSession session, ComponentDto item, boolean isMainBranch) 3. fixed UT code
based on the branch: feature/sonarqube-10_0-support 1. upgrade sonarqubeVersion to '10.0.0.68432' 2. fixed dbClient.componentDao().insert(DbSession session, ComponentDto item, boolean isMainBranch) 3. fixed UT code
based on the branch: feature/sonarqube-10_0-support 1. upgrade sonarqubeVersion to '10.0.0.68432' 2. fixed dbClient.componentDao().insert(DbSession session, ComponentDto item, boolean isMainBranch) 3. fixed UT code
Any chance to let GitHub build the artifact of this PR? |
Get the Artifacts, see as: https://github.com/bluebu/sonarqube-community-branch-plugin/actions/runs/5621946627 |
Thanks a lot, it works for our 10.1 installation! |
Any update on the fix? |
how is 10.2 support? |
Thanks for the merge! |
Sonarqube 10 has removed legacy support for modules as well as removing deprecated properties historically used for specifying branch targets. Additionally, the interface for managing Sonarqube features has had a method renamed, which makes the new version of Sonarqube binary incompatible with the plugin. The references to Sonarqube's removed code have been removed from the plugin, and the implementations of the interface and Java agent that dynamically updates Sonarqube code that also implements the interface have been updated to use the new method name.