Inconsistent results from api/projects/export_findings

Must-share information (formatted with Markdown):

  • SonarQube Enterprise version 9.9.0.65466
  • Deployed via Docker
  • Export issues for all projects via the API
  • paging through api/issues and hitting api/projects/export_findings
  • I will not be sharing any of the text as they are issues for internal projects

The api/issues endpoint has a max results of 10,000 so for very large projects exporting from that endpoint doesn’t function. The api/projects/export_findings endpoint returns all issues supposedly, but the count of the issues returned changes with every call.

For example when I query export_findings 10 times in 30 seconds, it returns 8 different totals for issues. I was testing on a project with a little over 5,000 issues just to ensure I didn’t hit any limits. Due to the very short time frame I’m also certain that there was no one in there changing issues or new scans taking place.

Hey there.

I would guess this is related to SONAR-20572, a bug that has been fixed in the v10.x version of SonarQube.

Is it possible for you to update a non-prod instance to SonarQube 10.4 to see if the issue is really the same?

That bug claims it only affects version 10, we are on 9.9. Unless I’m reading that wrong

It’s not the most thorough field – the one report we got came from 10.0. It hasn’t, to this point, been reproduced on 9.9, but that doesn’t exclude it as a possibility.

Okay, is this fix also available in the latest LTS version 9.9.4 or do we have to upgrade to 10?