One of our developers accidentally ran a scan on a branch that hadn’t been configured to exclude a bunch of 3rd party vendor code. This caused us to exceed our licensed number of lines of code. Because we exceeded our license, we can no longer run analyses.
It says it isn’t possible to delete the most recent scan, which is the exact one I need to delete. I think that means there is no way to recover from this without deleting the project or buying a license to cover hundreds of thousands of lines of code more than we need.
I appreciate wanting to prevent people from exceeding their license and then just deleting that scan, but you should reject the scan before it’s logged rather than lock the entire system after the fact in an unrecoverable way.
We’re running Version 7.1 (build 11001). It doesn’t sound like this issue has be fixed in later versions but I may try upgrading just to see if it changes something.
This precise situation has actually been improved since SonarQube 7.2 . Since then the behaviour is the following:
When processing a background task, if the Compute Engine calculates that completing the processing will push the customer over their LOC limit, fail the task with an appropriate error
De-facto preventing any sort of dead-end situation (the overall LOC can’t make it above the licenses threshold, the background task fails first).
For now if there’s no simple cleanup that could do the trick on your end, then I would recommend getting in touch with your SonarSource Sales Contact: they might be able to arrange a temporary license that’ll let you do the necessary operations/analysis to get back below LOC threshold.
And then do plan an upgrade (FYI v7.4 is coming in a week or two), to benefit from the improved logic that will avoid any such situation!
Thanks for the reply. I’m glad to hear that this has been recognized as a bug and resolved. I think in our case we may just delete the project and start fresh, we haven’t been running sonarqube for too long and I don’t think we really need those historical scans at the moment.