Monorepo Creation: Unable to Find Repository With Bitbucket Server ALM Configuration

  • SonarQube Server 10.7 (96327), Bitbucket Server 8.19.3
  • how is SonarQube deployed: Helm
  • what are you trying to achieve: Create monorepo, however, ALM configuration is not able to find repository in dropdown
  • When I try to create a monorepo, I select the ALM configuration, however, I am not able to find/view the repository. When I went to inspect the traffic, I could see that the api/alm_integrations/list_bitbucketserver_projects, it only responded with 25 projects. The project I am trying to find the repository in was not in the list. My suspicion is that this is a bug in the API call to paginate with 25 objects, however, it should list all projects.To be clear, the ALM integration works for normal DevOps integration, but not for monorepo feature.

Best regards,

Mark

1 Like

Hey Mark,

Just to be 100% clear, and also for anyone else reading this to understand, you are facing this problem showcased in this screencast: Screen Recording 2024-11-07 at 18.40.43.mov.zip (11.9 MB)

Indeed the UI is buggy here because even though the search feature worked in the backend (/api/alm_integrations/search_bitbucketserver_repos returned repository Repo 27 in this example), it doesn’t display it :thinking:

We are in the process of revamping the standard page (not the mono-repo one) as we speak, so I will bring that up internally so it can be looked at as well. You can expect improvements in SonarQube Server 10.8!


As for what to do until then: you can create several Manual projects, and go in their Admin settings > “DevOps Platform Integration” to configure their binding to the same repository on BitBucket, and don’t forget to tick the box “Enable monorepository support”.
Does that make sense to you?

Cheers,
Antoine

Hi Antoine,

That is similar, could be the same, but not sure. From the video, it does look to be the same behavior, however, I can see that the list projects function is only return 25 projects, which is what is being passed to the search projects function. I was able to follow the workaround suggestion and create a manual project. Besides checking the box for monorepo support, is there anything else to ‘link them together’? Feel free to direct to docs, I was expecting to have a ‘parent’ monorepo project with ‘child’ projects, which I could then view all metrics in the ‘parent’ monorepo project? The docs at Managing projects in a monorepo & SonarQube do not go into much detail.

Thanks for the response and at least confirming there is an issue.

Best regards,

Mark

Nope. Technically, the multiple projects on SonarQube are not linked together, there is just multiple projects pointing at the same repository.
The support of monorepo means that those multiple projects can concurrently decorate PRs of a single repo (ie. multiple SQ reports in one PR), vs. otherwise only one project allowed to decorate a single repo.

I hope this helps!

Antoine