Migration guide to app version 4

App version 4.0 removed some features and requires manual work if you used some of these features or if you provisioned the app’s settings with its REST API.

This page helps customers upgrading from app versions 2.x/3.x to the 4.x version line.

App versions 4.x officially support SonarQube versions newer than 7.6, both community as well as commercial editions.

 

Removal of branch-based mode

We removed the branch-based mode which calculated the diff between the two branches of the pull request for its metrics because it resulted in confusion when the metrics did not match with what SonarQube shows, where everything is based on leak period mode.

The app will automatically use leak period mode in versions >= 4.0.

Usage of SonarQube Webhooks for pull request decoration

App versions < 3 fetched issues from SonarQube by its REST API to annotate pull requests. This is not possible with Bitbucket 7 anymore, so we switched to use Bitbucket Code Insights for this.

Our usage of Code Insights requires that you configure a webhook in SonarQube. The app is able to create such a configuration automatically, but if you need a manual webhook due to your authentication requirements, or if you experience any issues like missing pull request annotations, please follow our SonarQube webhook configuration guide.

Removal of custom merge checks

Before 4.0, the app supported custom merge checks. We decided to remove them because for most use cases, one can now use the built-in quality gates SonarQube provides or the built-in Bitbucket merge checks instead.

The following table will show which Quality Gates of SonarQube match the behavior or are very similar to the custom merge checks provided by the app so that you can switch:

Custom merge check

SonarQube built-in merge check

Custom merge check

SonarQube built-in merge check

Technical debt max increase in %

Added technical debt on new code

Sonar issues max increase

Issues on new code

Duplicate code max increase in %

Duplicated Lines (%) on new code

Coverage min. threshold in %

Coverage on new code

The following table will show which merge checks of Bitbucket match the behavior or are very similar to the custom merge checks provided by the app so that you can switch:

Custom merge check

Bitbucket built-in merge check

Custom merge check

Bitbucket built-in merge check

Prevent failed or in-progress builds

Minimum successful builds (Repository Settings → Merge Checks)

REST API changes

As part of the feature cleanup with app version 4.x, the following fields from the app’s repository settings have been removed, and are thus also not available anymore in the repository settings REST API, so you can remove them as well from your automation scripts:

  • analysisMode

  • showOnlyNewOrChangedLines

  • incrementalModeForMatches

  • showOnlyNewIssues

  • showResolvedIssues

  • enableIssueOverview

  • collapsedByDefault

  • showQualityGates

  • showBehindCommitsWarning

  • technicalDebtMaxIncrease

  • sonarIssuesMaxNew

  • sonarIssueTypeMaxNew

  • duplicateCodeMaxIncrease

  • coverageMinPercentage

  • noMoreUncoveredLines

  • noInProgressOrFailedBuild

Troubleshooting

If you experience any problems during the app upgrade, check our Troubleshooting guide, and in case of permanent issues, let us know by creating a support ticket.

 

SONAR™, SONARQUBE™ and SONARCLOUD™ are independent and trademarked products and services of SonarSource SA: see sonarsource.com, sonarqube.org, sonarcloud.io.