Pull request decoration not functioning

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Sonarqube version 8.6.1.40680

  • what are you trying to achieve
    Currently setting up sonarqube to integrate with Gitlab to have pull request decoration.
    But, the Merge request decoration doesnt happen and I am unable to see any merge requests in the tab, but I can see the branches.

  • what have you tried so far to achieve this
    I have followed the steps for ALM integration of Importing gitlab projects to SonarQube and I have followed the steps for adding MR decoration to gitlab.
    GitLab integration
    The ALM integration in global settings is valid, and the project settings are set up

I did some digging in the ce.logs and came across the following:

bash-5.0# cat ce.log | grep PostProjectAnalysis
2021.02.15 10:15:08 INFO ce[…][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Webhooks | globalWebhooks=0 | projectWebhooks=0 | status=SUCCESS | time=5ms
2021.02.15 10:15:08 INFO ce[…][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Pull Request decoration | status=SUCCESS | time=0ms
2021.02.15 11:03:35 INFO ce[…][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Webhooks | globalWebhooks=0 | projectWebhooks=0 | status=SUCCESS | time=4ms
2021.02.15 11:03:35 INFO ce[…][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Pull Request decoration | status=SUCCESS | time=0ms
2021.02.15 11:24:41 INFO ce[…][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Webhooks | globalWebhooks=0 | projectWebhooks=0 | status=SUCCESS | time=5ms
2021.02.15 11:24:41 INFO ce[…][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Pull Request decoration | status=SUCCESS | time=0ms
2021.02.15 11:37:41 INFO ce[…][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Webhooks | globalWebhooks=0 | projectWebhooks=0 | status=SUCCESS | time=6ms
2021.02.15 11:37:41 INFO ce[…][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Pull Request decoration | status=SUCCESS | time=0ms
2021.02.15 13:29:58 INFO ce[…][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Webhooks | globalWebhooks=0 | projectWebhooks=0 | status=SUCCESS | time=5ms
2021.02.15 13:29:58 INFO ce[…][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Pull Request decoration | status=SUCCESS | time=0ms
2021.02.15 13:44:25 INFO ce[…][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Webhooks | globalWebhooks=0 | projectWebhooks=0 | status=SUCCESS | time=5ms
2021.02.15 13:44:25 INFO ce[…][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Pull Request decoration | status=SUCCESS | time=0ms

Im getting no error, its just not functioning after following the instructions, any help and guidence will be appreciated.

Welcome to the community forum! Are you using Gitlab CI?

Hi Pierre! Thank you

Yes sorry, we are using Gitlab CI/CD and its a self-managed instance.

Did you add the merge_request only flag on your job? could we see a snippet of your yaml file?

1 Like

Ahh no, I didnt realise the “Analyzing projects with GitLab CI/CD” was to be included, apologies and thank you for the guidence there, all sorted now. Thank you again @pierreguillot !

1 Like

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