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

Bitbucket integration non compliant to the documentation #934

Closed
ahermes opened this issue Jul 17, 2024 · 2 comments · Fixed by #951
Closed

Bitbucket integration non compliant to the documentation #934

ahermes opened this issue Jul 17, 2024 · 2 comments · Fixed by #951
Labels
bug Something isn't working

Comments

@ahermes
Copy link

ahermes commented Jul 17, 2024

Describe the bug
I upgraded my old SonarQube to the 9.9 LTA and my quality report keys has changed from com.github.mc1arke.sonarqube to the SonarQube project key of my maven project.

With the update from the plugin version 1.8.1 to 1.11.0, the static report key was changed to the project key which is not what is stated in the sonarqube documentation : Bitbucket Integration
=> Add a Required report called com.sonarsource.sonarqube

To Reproduce
Steps to reproduce the behavior:

  1. With SonarQube 9.9 LTA
  2. Follow the documentation on a bitbucket project
  3. Start mvn sonar:sonar command with -Dsonar.pullrequest.key, -Dsonar.pullrequest.branch and -Dsonar.pullrequest.base
  4. See on the PR that "The associated report with the key 'com.sonarsource.sonarqube' was not created"

Expected behavior
The report associated with the PR analysis is expected to be com.sonarsource.sonarqube

Screenshots
quality_report

Software Versions

  • SonarQube Version: [v9.9.6 (build 92038)]
  • Plugin Version: [1.14.0]
@ahermes ahermes added the bug Something isn't working label Jul 17, 2024
@ummarbhutta
Copy link

I don't see this issue with Plugin version 1.19.0 and SonarQube 10.4 . Looks like it is fixed in later versions of plugin.

@mc1arke
Copy link
Owner

mc1arke commented Aug 11, 2024

This was an intentional choice in #578, however I wonder if it should be altered to use the static project key for non-mono-repos, and only use a dynamic key when in a mono-repo, given the documentation states Preventing pull request merges when the quality gate fails is not supported for monorepos., so Sonarqube presumably does something similar in its implementation.

mc1arke added a commit that referenced this issue Aug 18, 2024
The Bitbucket decoration is currently using the project key to create
the analysis report key, but the Sonarqube documentation states this
should be a static value across all projects. To ensure that the
Bitbucket `Required report` configuration can be created as per the
guidance in Sonarqube documentation, the static key is being used where
the repository has not been set as a monorepo.
mc1arke added a commit that referenced this issue Sep 6, 2024
The Bitbucket decoration is currently using the project key to create
the analysis report key, but the Sonarqube documentation states this
should be a static value across all projects. To ensure that the
Bitbucket `Required report` configuration can be created as per the
guidance in Sonarqube documentation, the static key is being used where
the repository has not been set as a monorepo.
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
3 participants