-
-
Notifications
You must be signed in to change notification settings - Fork 537
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
Plugin does not work with Sonarqube 9.1 #454
Comments
Hi |
The plugin hasn't been updated for Sonarqube 9.1 yet. The methods for accessing the passwords/keys/tokens in Sonarqube now allow for the values to be encrypted, so require passing the encryption token into the relevant methods. I've got changes on my machine, but haven't tested that they work when encryption is enabled. |
Sonarqube 9.1 encrypts the sensitive fields for DevOps decorators, such as private keys and personal access tokens. To allow the decorators to access these properties, the relevant methods now require encryption details to be provided, so the encryption handlers are now being loaded from the internal Sonarqube settings and passed to the appropriate target methods. A change is also required in `SetBindingsAction` to pass additional fields for recording on the audit log when settings are saved. No additional settings are being added for the auditing as community edition does not provide a user interface for accessing audit logs, and uses a default cleaner task for purging logs after 30 days.
Can you try running the Snapshot from the artefacts section of https://github.com/mc1arke/sonarqube-community-branch-plugin/actions/runs/1279732750 and let me know if it resolves the issue for you please? |
Can you confirm if it's the space that's causing issues, or the umlaut above the |
We also have a project which is called "ADL Server" - there it is also not working so I assume it is the space... But on the SonarQube Frontend it is also not working - this is not part of you plugin I guess so it is maybe a common SonarQube issue? |
Btw the images are working in firefox but not in chrome. Chrome is blocking it because our SonarQube Instance is not accessed via https |
Could you raise a separate issue for the space in the project name please, as it's unrelated to Sonarqube 9.1 support. I can't do much about the HTTP vs HTTPS issue as there's already a way of working around that by specifying an alternative location to load images from within your Sonarqube installation. |
I have created the new issue. The HTTPS issue is resolved by using a reserve proxy to provide an https access to SonarQube. |
Sonarqube 9.1 encrypts the sensitive fields for DevOps decorators, such as private keys and personal access tokens. To allow the decorators to access these properties, the relevant methods now require encryption details to be provided, so the encryption handlers are now being loaded from the internal Sonarqube settings and passed to the appropriate target methods. A change is also required in `SetBindingsAction` to pass additional fields for recording on the audit log when settings are saved. No additional settings are being added for the auditing as community edition does not provide a user interface for accessing audit logs, and uses a default cleaner task for purging logs after 30 days.
The plugin 1.9.0 is compatible with Sonar9.1? I have an error. I attach the log error:
I follow the configuration in readme, this is an extract of my deployment configuration:
|
Interesting. I use
and the plugin starts up well. |
I've set this up with Docker running sonarqube:9.1-community and it doesn't seem to be working. If I click on the "+" next to a branch name, I see this pop-up:
|
Is it in kubernetes? could you share your deployment configuration? Thank you! |
I also get the popup but branches are created when I scan a project with the branch-property set. No, I run it via docker on a local server. |
How are you doing this? I'm using GitHub Actions and if I try to set the the branch name, Sonar really gets upset.
This only breaks after introducing the |
:) I just started a docker container, copied the plugin into the right dir, added the two config lines, restarted the container and that's it. |
but how are you triggering the branch property? Are you using Thank you :) |
Here the steps how I managed it to work: Dockerfile FROM sonarqube:9.1.0-community
RUN wget -O /opt/sonarqube/extensions/plugins/sonarqube-community-branch-plugin-1.9.0.jar https://github.com/mc1arke/sonarqube-community-branch-plugin/releases/download/1.9.0/sonarqube-community-branch-plugin-1.9.0.jar && \
sed -i 's#.*sonar.web.javaAdditionalOpts=.*#sonar.web.javaAdditionalOpts=-javaagent:./extensions/plugins/sonarqube-community-branch-plugin-1.9.0.jar=web#' /opt/sonarqube/conf/sonar.properties && \
sed -i 's#.*sonar.ce.javaAdditionalOpts=.*#sonar.ce.javaAdditionalOpts=-javaagent:./extensions/plugins/sonarqube-community-branch-plugin-1.9.0.jar=ce#' /opt/sonarqube/conf/sonar.properties \
|
Thanks, @guenhter. This was very helpful and helped me see where I was going wrong with setting up the Docker container. However, it still doesn't work if I use Sonar's GitHub Action to trigger the scanning. The server itself complains with this:
and the Action reports:
It would seem that the current incarnation of the plugin is not "doing enough" to convince Community Edition that branch feature is supported and allowed. (This might also be why clicking on the + doesn't display the branch menu but an upgrade message instead). (Just to add that the above are from when we're doing a straightforward scan of a branch, not a PR scan) |
It does work for me on CE 9.1 (build 47736) with Azure DevOps. No errors when saving the devops configuration in settings and branch pulldown menu works as well. |
any update on this? I am running into the same issue. I am running sonarqube community 9.1 in kubernetes. the plugin seems to load fine but when I add -Dsonar.branch.name in github action i get the error |
@pcolmer were you able to find a workaround for this? |
+1 Running 9.2 Community Edition, I have the error "Current edition does not support branch feature" when running analysis, HTTP error 500 returned to the pipeline. Some logs, seems normal, no error shown.... :
|
1.10.0 of the plugin has been released supporting Sonarqube 9.1 and Sonarqube 9.2 |
@renperez-cpi apologies for the delay in replying. I was trying to set up a completely new instance of CE with the plugin and a clean database to see what the behaviour was then. Unlike @codingwish, I'm still not seeing the branch pulldown menu: Attempting to analyse multiple branches using the GitHub Action sonarsource/sonarqube-scan-action@master results in all of the scan results being stored against the same branch. I'll create a new GitHub issue so that this can be investigated further with @mc1arke. |
Hi we updated our SonarQube and the branch Plugin. So far so good, but the Devops PR decoration is not working anymore. An exception is thrown during the PR decoration. The same error is also thrown when accessing the DevOps Platform Integration menu in the SonarQube UI. Is this caused by the SonarQube 9.1 Version?
The text was updated successfully, but these errors were encountered: