Can you check your background tasks and server logs to see if there’s anything relevant? Specifically, look in the ce.log right after analysis processing to see if there’s anything related to the decoration. (Yes, you checked for the word “decoration” but I don’t think that’s actually used in logging.)
Thanks a lot for reporting this, and for sharing the logs.
I’ve tested migrating from 9.3 to 9.5 with a Gitlab configuration, and PR decoration seems to be working fine. Therefore I could not reproduce what you’re seeing.
From the logs you’ve shared, it seems that no PostProjectAnalysisTasks are being executed, since those would be logged right after the Trigger refresh of Portfolios and Applications step.
I have a few questions that could help diagnose what’s wrong:
What edition were you in in 9.3, and what edition are you using for 9.5? PR Decoration won’t happen in a Community Edition instance.
Could you change the log level to TRACE and share if there are more meaningful logs after analysing a project for which there should be PR decoration? See here on details on how to change it.
Do you have any analysis warnings on the PR on SQ? You can find them here, at the top right:
I work with Alexandre and Guillaume and I am trying to solve this problem.
Here are the answers to your questions that might help you understand the case better.
We were using SonarQube 9.3 Enterprise and we have upgraded to SonarQube 9.5 Enterprise.
We have changed the log level to TRACE and we still cannot find any logs related to PR decoration.
We have checked the analysis warnings on the PR and they have no impact on the PR decoration.
We also created a new gitlab configurations with a new access token and we encountered the same problem.
Hi @Guilhem_Lauro and others, I will take over diagnosing this issue from Belen as she is out of office.
We didn’t manage to reproduce the issue. However if you could share with us the TRACE logs of compute engine when the analysis happens it would help us in further investigating it.
Also, based on our investigation so far, it seems likely that in your case/environment if you have any webhooks attached to the project analysis then they will not be called. Would be great if you could confirm it, but this is optional.
Hi Łukasz,
Thanks for your feedback. I will send you more logs in TRACE mode but before I do I noticed that the pullRequests objects we get from GET api/project_pull_requests/list no longer have the url parameter. I checked on a pull request with the decorator that was analized before the sonar update and the url parameter is present.
Here is a job log file in TRACE mode: sonar.log (1.0 MB)
I think the problem is more related to the URL that is not returned when we call the GET api/project_pull_requests/list.
Hey,
Thanks a lot for the logs. I know it is a long shot but there is something really worrying in the logs you shared:
Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@277050dc-org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor': Unsatisfied dependency expressed through constructor parameter 5; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ClassRealm{sonarslacknotifier}-com.byoskill.sonar.slacknotifier.extension.task.SlackPostProjectAnalysisTask':
Resolution of declared constructors on bean Class
[com.byoskill.sonar.slacknotifier.extension.task.SlackPostProjectAnalysisTask] from ClassLoader [ClassRealm{sonarslacknotifier}] failed; nested exception is java.lang.NoClassDefFoundError: org/sonar/api/i18n/I18n
Which might impact creation of other PostProjectAnalysisTasks. Would you be able to remove the Slack plugin (it seems it doesn’t work anyway?) and try again?