No pull request decoration since 9.5

Hello,

We have updated our Sonarqube instance from 9.3 to 9.5 on the july 21th.
Since that update we have no more pull request decoration.

I’ve checked that the configuration on Administration ==> DevOps Platform Integrations was OK

image

I’ve also checked some project and everything looks fine.

I’ve checked all the log on the server but there is no occurence of the verb “decoration” since the update.

Do you have any idea or hints ?

Thanks in advance.

Hi,

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.)

 
Ann

Hello there,

I’m working in the same team as Guillaume
I’m posting a piece of server logs here

sonarqube_ce.log

2022.07.26 06:29:59 INFO  ce[][o.s.c.t.CeWorkerImpl] Execute task | project=some-project-key | type=REPORT | pullRequest=1383 | id=AYI5Mq0SxyA_i4LwHXSH | submitter=admin-user
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Extract report | status=SUCCESS | time=168ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Persist scanner context | status=SUCCESS | time=6ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Propagate analysis warnings from scanner report | status=SUCCESS | time=8ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Generate analysis UUID | status=SUCCESS | time=0ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Load analysis metadata | status=SUCCESS | time=5ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Initialize | status=SUCCESS | time=8ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Build tree of components | components=22 | status=SUCCESS | time=56ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Validate project | status=SUCCESS | time=4ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Load quality profiles | status=SUCCESS | time=646ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Load Quality gate | status=SUCCESS | time=6ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Load new code period | status=SUCCESS | time=0ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Detect file moves | reportFiles=9 | dbFiles=9 | addedFiles=0 | status=SUCCESS | time=4ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Load duplications | duplications=280 | status=SUCCESS | time=24ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Compute cross project duplications | status=SUCCESS | time=0ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Compute size measures | status=SUCCESS | time=0ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Compute new coverage | status=SUCCESS | time=1ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Compute coverage measures | status=SUCCESS | time=76ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Compute comment measures | status=SUCCESS | time=0ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Compute duplication measures | status=SUCCESS | time=3ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Compute size measures on new code | status=SUCCESS | time=0ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Compute language distribution | status=SUCCESS | time=0ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Compute test measures | status=SUCCESS | time=1ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Compute complexity measures | status=SUCCESS | time=0ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Load measure computers | status=SUCCESS | time=0ms
2022.07.26 06:30:00 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Compute Quality Profile status | status=SUCCESS | time=4ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Execute component visitors | status=SUCCESS | time=197ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Checks executed after computation of measures | status=SUCCESS | time=31ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Compute Quality Gate measures | status=SUCCESS | time=8ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Compute Quality profile measures | status=SUCCESS | time=0ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Generate Quality profile events | status=SUCCESS | time=3ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Generate Quality gate events | status=SUCCESS | time=0ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Check upgrade possibility for not analyzed code files. | status=SUCCESS | time=0ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Persist scanner analysis cache | status=SUCCESS | time=0ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Persist components | status=SUCCESS | time=11ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Persist analysis | status=SUCCESS | time=4ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Persist analysis properties | status=SUCCESS | time=8ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Persist measures | inserts=64 | status=SUCCESS | time=9ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Persist live measures | insertsOrUpdates=1408 | status=SUCCESS | time=171ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Persist duplication data | insertsOrUpdates=0 | status=SUCCESS | time=0ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Persist new ad hoc Rules | status=SUCCESS | time=0ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Persist issues | cacheSize=0 bytes | inserts=0 | updates=0 | merged=0 | status=SUCCESS | time=0ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Delete issue changes | changes=0 | status=SUCCESS | time=0ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Persist project links | status=SUCCESS | time=0ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Persist events | status=SUCCESS | time=6ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Persist sources | status=SUCCESS | time=13ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Persist cross project duplications | status=SUCCESS | time=0ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Enable analysis | status=SUCCESS | time=5ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Update last usage date of quality profiles | status=SUCCESS | time=6ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Purge db | status=SUCCESS | time=40ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Index analysis | status=SUCCESS | time=11ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Update need issue sync for branch | status=SUCCESS | time=3ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Send issue notifications | status=SUCCESS | time=0ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Publish task results | status=SUCCESS | time=0ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.s.ComputationStepExecutor] Trigger refresh of Portfolios and Applications | status=SUCCESS | time=0ms
2022.07.26 06:30:01 INFO  ce[AYI5Mq0SxyA_i4LwHXSH][o.s.c.t.CeWorkerImpl] Executed task | project=some-project-key | type=REPORT | pullRequest=1383 | id=AYI5Mq0SxyA_i4LwHXSH | submitter=admin-user | status=SUCCESS | time=1761ms

But still no decoration

2 Likes

Hi,

Thanks for the logging. I’ve flagged this for more expert attention.

 
Ann

Hey @GuillaumeDS and @AlexandreJV,

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:

  1. 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.
  2. 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.
  3. Do you have any analysis warnings on the PR on SQ? You can find them here, at the top right:
    Screenshot 2022-07-29 at 11.56.40

Hi,

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.

  1. We were using SonarQube 9.3 Enterprise and we have upgraded to SonarQube 9.5 Enterprise.
  2. We have changed the log level to TRACE and we still cannot find any logs related to PR decoration.
  3. 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.

Hoping that this informations will help you.

Guilhem

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.

I hope this helps you understand our problem.

Guilhem

1 Like

Hi,

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.

1 Like

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?

1 Like

Hi,

We removed the Slack plugin and it worked.
Thank you very much for your help.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.