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

Sonar 9.4/9.6 and plugin v1.12 issues #666

Closed
zbubric opened this issue Sep 9, 2022 · 3 comments
Closed

Sonar 9.4/9.6 and plugin v1.12 issues #666

zbubric opened this issue Sep 9, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@zbubric
Copy link

zbubric commented Sep 9, 2022

Describe the bug
Running branch analysis results with 'Branches and Pull Requests are not supported in Community Edition' error.

To Reproduce
Steps to reproduce the behavior:

  1. Installed plugin according to instructions
  2. Run analysis on default branch - went OK
  3. Run analysis with branch option - error: 'Branches and Pull Requests are not supported in Community Edition'.

Expected behavior
Analysis performed for provided branch, branch selection available in Sonar GUI

Screenshots
If applicable, add screenshots to help explain your problem.

Software Versions
System no.1 - 'production'

  • OS: RHEL 8
  • SonarQube Version: 9.4 community
  • Database: postgres
  • Plugin Version: 1.12.0

System no. 2 - test environment

  • OS: Win 10
  • SonarQube Version: 9.6 community
  • Database: in-memory
  • Plugin Version: 1.12.0

Additional context
On both system, Sonar started normally after plugin installation and showing plugin as installed in 'Administration/Marketplace'.
On project dasboard's 'branch selection area', only default (master) branch is shown with default message that branch analysis is available upon upgrade (like plugin is not installed).
Trying to run branch analysis results with error:

  • Sonar 9.4: scanner execution returns error 500, analysis is not recorded on Sonar server
  • Sonar 9.6: scanner execution SUCCESS but, Sonar server reporting analysis error 'Branches and Pull Requests are not supported in Community Edition'.

We look into other issues and found two potential workarounds to try:

We try multiple combinations of those two approaches (jar location and way to set additional options) but, in all cases we get same result: '...not suported'.

Also, we noticed in web.log that, during plugin deployment, 'Community Branch Plugin' is the only one that have null as result(whatever it means):

2022.09.09 14:41:14 INFO  web[][o.s.c.e.CoreExtensionsLoader] Loaded core extensions: Community Branch Plugin
2022.09.09 14:41:14 INFO  web[][o.s.s.p.ServerPluginManager] Deploy C# Code Quality and Security / 8.43.0.51858 / ea4ebe67a39f7307112b8ee10d3e3ac5eb47e6fe
2022.09.09 14:41:14 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Community Branch Plugin / 1.12.0 / null
2022.09.09 14:41:14 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Configuration detection fot Code Quality and Security / 1.2.0.267 / 4f37ba9ffb37a96d5883e52ad392ed32c5c6eaab
2022.09.09 14:41:14 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Flex Code Quality and Security / 2.7.0.2865 / 9e61d9774455b25eefd0b71bf8903cb030641864
2022.09.09 14:41:14 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Go Code Quality and Security / 1.10.0.3710 / 8913c511c9a0db473d7f0fd2c3a4b17d60e51f5e

Any suggestion/ideas what we miss and what else we should try to make it work?

thx in advance

@zbubric zbubric added the bug Something isn't working label Sep 9, 2022
@PhilippSalvisberg
Copy link

@zbubric : I've installed SonarQube 9.6.1 Community Edition and the Community Branch Plugin Version 1.12.0. Works like a charm.

Have you set

sonar.web.javaAdditionalOpts=-javaagent:./extensions/plugins/sonarqube-community-branch-plugin-1.12.0.jar=web
sonar.ce.javaAdditionalOpts=-javaagent:./extensions/plugins/sonarqube-community-branch-plugin-1.12.0.jar=ce

in conf/sonar.properties as documented in https://github.com/mc1arke/sonarqube-community-branch-plugin#manual-install ?

@daudo
Copy link

daudo commented Sep 19, 2022

works here, too

@zbubric
Copy link
Author

zbubric commented Sep 21, 2022

Sorry for late reply but, I found a cause of issue: rights on the downloaded file itself.
So, if anybody bump into this one having same issues: ensure that file rights are properly set on downloaded jar file.

@zbubric zbubric closed this as completed Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants