We are trying to implement PR decoration in our proyect following https://docs.sonarqube.org/latest/analysis/pr-decoration . However we are encounting a message like this: Pull request decoration did not happen. Please configure pull request properties in the project administration.
We are using gitlab-ci version 12.7.1 using shell configuration to use both, sonarqube and scanner in a server (locally) and the repository is remote. Also created a gitlab user and obtained the user token with api access. with token we configured PR decoration tab in the left sonarqube’s panel in Gitlab tab.
Hi,
Could you please check your logs (<sonarqube_install>/logs/ce.log>) and see if there is anything relevant?
If I understood correctly, you are using a self managed GitLab CI/CD and code repository?
Hi, i will check later because im not currently on PC. Im using self managed gitlab CI/CD (dedicated runner on the machine using shell) but using a remote repository (gitlab.com) not self managed.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/home/gitlab-runner/.sonar/cache/a89f1943fc75b65becd9fb4ecab8d913/sonar-tsql-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
es.log
2020.02.20 10:38:10 WARN es[][o.e.d.c.s.Settings] [http.enabled] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.
web.log
2020.02.20 10:38:24 WARN web[][o.s.s.a.LogOAuthWarning] For security reasons, OAuth authentication should use HTTPS. You should set the property 'Administration > Configuration > Server base URL' to a HTTPS URL.
2020.02.20 10:38:24 WARN web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/plugins/download
2020.02.20 10:38:24 WARN web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/permissions/search_templates
2020.02.20 10:38:24 WARN web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/support/info
sonar.log
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
ERROR: [2] bootstrap checks failed
SonarQube needs a GitLab user to decorate the merge requests. Did you:
Generate an access token for the GitLab user with scope “API” activated?
Grant “reporter” permission to the GitLab user for the project where merge requests are performed
In SonarQube, did you:
Create a “Merge Request Decoration configuration” under (Global-) Administration->Pull Request Decoration-> GitLab?
For the SonarQube project itself, did you select the above configuration in (Project-) Administration → General Settings → Pull Request Decoration
If all yes, can you see the analysis of the Merge Request in SonarQube (Project-) Administration → Branches & Pull Request → Pull Requests ?
Any network issues between the 2 servers (e.g. a Firewall)?
I’ve struggled with PR decoration on Github for quite a while. We had just the message that you also see “Pull request decoration did not happen…”.
The reason in the end was that our .git folder was not present during the scan and Sonar refused to create PR decorations despite all required settings where made. I think this is a undocumented requirement.
I have same issue. SonarQube seems to be configured (GitLab url and token provided). sonar-scanner finished with no errors, analysis on server side as well. Some issues are found in code but PR is not decorated. That’s the only warning I get “Pull request decoration did not happen. Please configure pull request properties in the project administration.”
Last comment doesn’t help cause in my case .git folder is in place. SonarQube logs also don’t contain any error/warning messages that could help me debug it. What else could I do to figure it out?
If project’s settings -> pull request decoration I have configuration chosen and project id empty. Yes, I’m using GitLab’s CI. Scanner is running fine and is able to send results to SonarQube.
Last analysis is still running (for 4 hours now) but that could be unrelated issue. Update: it got somehow canceled after 12h 20m of runtime.
The error message indicates that while processing the analysis, SonarQube did not find the P/R decoration settings for that project.
Could you try getting <SONARQUBE_URL>/api/alm_settings/get_binding?project=<project_key> ?