Renaming group in Gitlab breaks some links in SonarCloud

Hello Team,

Since 19th October there are new restrictions regarding in place at Gitlab, which forced us to move all our projects into a common “group” at Gitlab. The IT Admin personal token is of course still valid, so SonarCloud sees the projects and that’s - I assume - why it still sees my commits and still works.

But some things are a bit broken because the links still point to the old Gitlab group name, so I was hoping you could tell me where to edit the organization settings more deeply than what I have found so far. The group name seems to be hardcoded somewhere in the background where I can’t edit it.

Another clue that points to this is that we get a red banner “Group ID not found” when opening the administration page
image

The things that are broken are:

  • This link on the administration gives a 404 since it points to the old group ID
  • The links to the Commit on the analysis page point to the old repository
    image

Something else I have tried is to create a new project and even there I did not see a field to specify the group ID.

So in summary: Can we edit the group id of the Gitlab project inside our SonarCloud organization

I think this issue is similar to this and this but they didn’t solve it for me so far

  • ALM used: Gitlab
  • CI system used: Gitlab CI
  • Languages of the repository: Java, Kotlin

Hello @radioPatrick,

Thank you for reaching out.
Usually, you just need to transfer your project to the new group via GitLab and then you import the new group via SonarCloud as any GitLab group with the new id of the group and the same access token that you used before. SonarCloud would recognize automatically your project and import all the historical data related to analysis.

Hope my answer is helpful.

Regards,
Nawar

Hi Nawar, thanks for your support!

It is exactly this “transfer” that confuses me. Let’s go throug this step by step:

Done. The analysis and history do also already understand this, there are no worries here from me in this regard. As I said before, the only problems are the broken links behind the things I posted in the first couple of screenshots of my first post

This is where I get confused. When I click on the “+” at the top right then I have two options.

  • I can “Analyze new project”, which does not show me my repositories
  • Or I can create a new organization, which I don’t want, right, cause I want to keep the payment plan that we have set up for the current organization

If I do actually click on the second option then I find the naming that matches your words the best, “Import any Gitlab Group”. Is that what I need to do?
image

If so, this confuses me a lot. When we enter the same token that is currently set in the organization (which is still valid as I can see on the Administration page)
image

then the UI shows an altered group name “mygroup-1” instead of “mygroup” and it looks like I need to add another payment plan

If I enter a different token I get a red error popup at the top saying “Unknown error”

I think some steps are missing here, would be very thankful for further assistance

Hey @radioPatrick,
I will reach out to you via DM to get some extra information.

Regards,

Hello @radioPatrick,

After investigation from SC side, we found that your new organization is still binding with the old one in the SonarCloud (unfortunately, we don’t have an auto binding in GitLab when updating the organization). We removed the binding for your organization so you should be able to re-bind using SonarCloud after choosing your organization => Administration => Organization settings => and then bind to your new group on the GitLab side!

Regards,
Nawar

Hi Nawar, ohhh that looks like a very good solution, unfortunately I am currently receiving this error:

Is there currently a server downtime or something?

Hey @radioPatrick,

I got in the logs this message: “Group with id ‘xxxx’ or member with username ‘xxxx’ could not be found.
I would suggest you to provide the Group ID value in organization settings on GitLab side instead of the group name. Make sure also that the user who is importing the group in SC should be a member of the group on GitLab side and everything should work as expected!

Please let me know if you need any additional help.

Regards,
Nawar

Hi Nawar, just to let you know please don’t expect any feedback from me until me xmas holiday is over, speak to you in January, thanks again!