[Bitbucket Monorepo] Not showing widget statistics on PR after analysis completion

Issue:

I have setup Monorepo projects (backend and frontend microservice folders on Bitbucket) in my Sonar Cloud organisation. I can see that the widget is working as expected on Bitbucket when I view my repo and can visibly see the statistics for my monorepo projects both frontend and backend.

However, when I raise a PR, the PR decorations does not show the Sonar Cloud widget with the PR statistics as it should be. I keep getting “Not analyzed on SonarCloud yet…” even though it has been analysed on Sonar Cloud (https://sonarcloud.io/dashboard?id=jeiman-SampleRepo-ms-typescript-backend&pullRequest=4)

image

I am unsure how to fix this as it should work automatically. If you require further details, please let me know, I will update my discussion.

Please advise.

Thank you.


UPDATE:
Would this be the cause of the issue that I am facing? Previously this option was disabled, however it does state that it only works for Azure DevOps PRs for monorepos?

image

Welcome to the community!

I looked at your repo and setup (thanks for the links and details, very useful!). I confirm that your expectation is correct, on the PR you should see two widgets (for frontend and backend), just like on the main branch, and it’s not happening for some reason. So indeed something’s wrong.

The toggle you mentioned in your UPDATE is not an issue, that’s for Azure only. It’s not clear to me what is wrong, I need more time to investigate, and possibly help from my colleagues on Monday. So please stay tuned, keep the PR, the repo, and your setup there so that we can investigate, and I’ll get back to you next week.

Hi Janos,

No problem. Noted on this.

Thank you very much for looking into this matter for me. I really appreciate it.

I will look forward to your reply.

Ok, so by the time I got a chance to take a closer look at the problem, it seems to be gone now: the 2 widgets are correctly displayed on your PR now. We haven’t changed anything related at our side. Have you changed anything? Do you have another PR with the issue?

I will continue internal discussions to see if this is a known bug.