Builds are failing withe below error post upgrade to sonar 7.9.2-LTS version

Template for a good bug report, formatted with Markdown:

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)
    Sonarqube Version 7.9.2-LTS
  • error observed (wrap logs/code around triple quote ``` for proper formatting)
    [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project xxxx… The ‘sonar.branch’ parameter is no longer supported. You should stop using it. Branch analysis is available in Developer Edition and above. See https://redirect.sonarsource.com/editions/developer.html for more information.
  • steps to reproduce
    we are getting this error with bamboo.
  • potential workaround

P.S.: use the #bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour

Hi Team,
All our maven builds are failing post upgrade to sonar-7.9.2-LTS version with below error. We have around 10K+ build plans which are being used on daily basis. Please advise what should be our next action.
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project xxxx… The ‘sonar.branch’ parameter is no longer supported. You should stop using it. Branch analysis is available in Developer Edition and above. See https://redirect.sonarsource.com/editions/developer.html for more information.

Thanks & Regards,
Mohit Saraf

Hey Mohit,

This change is noted in the Upgrade Notes

Analysis fails with old branch parameter sonar.branch was deprecated in 6.7. With this version analysis fails when it is used. Where it is still in use, simply remove the sonar.branch property and update your sonar.projectKey value to key:branch .

You will ultimately need to remove uses of sonar.branch from your build plans in your SonraQube analyses to succeed.

Are you using the Sonar for Bamboo from Mibex? If I recall – there’s an option to disable the use of sonar.branch or sonar.branch.name (when Developer Edition or greater is being used). See the fifth section of this documentation.

Hey Colin,

Thank You for your prompt response!!

Yes we are using Sonar for Bamboo but we don’t have the developer edition… So it looks like we can’t run scans on sub branches anymore with the community edition. Is this my correct understanding?

Thanks & Regards,
Mohit Saraf

Hey Colin/Team,

Please advise if my understanding is correct

Thanks & Regards,
Mohit Saraf

Mohit,

Some of us do take a break from the community to eat dinner and sleep. :wink:

When you were analysing “branches” with the old-school sonar.branch, all it was doing was creating a brand new project on your instance with the branch name appended – not taking advantage of any of the Branch Analysis features of the Developer Edition of SonarQube).

You could mimic this as the Upgrade Notes state, although I’m not exactly sure how you would do that in the context of the Mibex Bamboo plugin (maybe a good question for them)

Analysis fails with old branch parameter sonar.branch was deprecated in 6.7. With this version analysis fails when it is used. Where it is still in use, simply remove the sonar.branch property and update your sonar.projectKey value to key:branch .

And, if you have 10k+ build jobs using SonarQube, maybe it’s time to look into a commercial edition of SonarQube_ :wink:

Hi Colin,

Apologies for bit pushy on this. It actually impacted our production environment. Thank You so much for helping me. I will reach out to Mibex Bamboo Plugin and update you if they provide a workaround.
Also, we will look into the commerical edition of Sonarqube :wink:

Thanks,
Mohit Saraf