Hello,
I am currently seeing an odd issue where in some projects (but not all) filtering for issues with “Resolution” set to “Unresolved” or “Status” set to “Open”, or “Issues in new code” selected, results in a forever spinning loading icon with “0 of X shown [Show More]” below it. The projects in question are not new, and have existed for several months, and did not exhibit this behavior until last week. No database or Sonarqube upgrades or restores took place between first analysis and this behavior first occurring, nor were any other manual changes to the database made.
This is in SonarQube Community LTS 9.9.5 (Helm Chart 8.0.5) with PostgreSQL 13.9.
Re-analyzing the same project does not have any effect, neither does removing the data/es7 directory and restarting Sonarqube, nor running a REINDEX on the database. The issue first appeared on 9.9.1 and upgrading to 9.9.5 did not resolve the issue.
After setting up TRACE level logs, capturing and investigating with manual SQL queries, the problem seems to be that the issues.component_uuid
field of the affected issues do not point to any valid components.uuid
, though issues.project_uuid
is set correctly.
After investigating with additional queries, the problem seems to be latently present on hundreds of projects (around a third of all projects).
The issues in question are from built-in profiles as well as third-party plugins.
- What could have caused this to happen?
- How do I prevent this from happening again?
- How do I resolve these “phantom” issues (as they are causing gate failures)? From a little investigation, it seems that “components” roughly correspond to files in a project, which suggests to me that these issues should have been closed when those files were removed. Is it sufficient and safe to find any such issues and manually set them to
status=CLOSED, resolution=REMOVED
via a manual sql UPDATE, or just outright deleting them? Deleting and re-creating all affected projects is out of the question due to the number of projects involved. - If nothing else, can a bug report be filed for the inconsistency between the reported and actual issue counts?