Project(s) become hidden after deleting the main branch (severe/blocking issue)

Must-share information (formatted with Markdown):

  • 10.2 ( build 77647)
  • kubernetes deployment (official chart)
  • pg 14 as the database
  • paid developer edition

After deleting the main branch (unscanned and never used for that project) the entire project disappears. The project itself seems to be still there, since i cannot recreate it (key taken), but i can neither access it using a deep link nor try to delete it using the REST api

I can reproduce this (happened 2/2 times now)

  1. pick a project having “main” as the default branch (but no scans on main). The project should have the master branch and some PRs scanned
  2. edit the branch settings fro the project and set master to be the default branch
  3. now delete the main branch

The entire project should now disappear but still be there (key taken). You can no longer do any scans nor inspect the project nor do anything with that.

What i tried

  • accessing the project via /admin/projects_management
  • accessing the project using deep links
  • listing the project using the WEB-API: /api/projects/search
  • deleting the project using the WEB-API: /api/projects/delete?project=KEY
  • recreate a project with the same key (error, key already taken)

Nothing seems to work and we are blocked.


you were hit by the bug Ann mentioned yesterday, see




Gilbert is right. This is unfortunately a known issue. We’re currently working on releasing a patch version, but it’s not ready yet. As described in SONAR-20481, it’s really not recoverable.

Please tell me you make a backup of your DB before you performed the upgrade…


1 Like

Thank you!. Yes, we have a backup and restored it.

10.2 is quite the update… half of the things included are missing from the release notes (immutable severity?) including this neat ‘surprise’.

Release notes do not include any known issue … not even this one. Considering we are dealing with an data-erasing (irrecoverable) bug, handling it in such a slow manner does not reflect what we pay as a maintenance fee for SonarSource.

1 Like


I promise you we’re not slow-walking the 10.2.1 release.

And on the rest… fair point. I’m going to raise this internally.



We’ve now released SonarQube 10.2.1 which fixes this problem.
See more details here:

About the change made to the severity in 10.2, it was mentioned in a quite large ticket related to the new Clean Code taxonomy (SONAR-20023). To give more visibility, we’ve now created some dedicated tickets about the changes applied to the old type and severity: SONAR-20517, SONAR-20518. Thanks for the feedback.