Unable to restore profiles from an older Sonar to SonarQube 6.7

SonarQube Version : 6.7

We are trying to upgrade Sonarqube from 5.1 version to 5.6.7 to 6.7. We have a certain set of rules in 5.1 Version that we would like to use on the newer version of SonarQube. But once we upgrade the version from 5.1 to 5.6.7 to 6.7, I am getting the following error while trying to run "Restore Profile:

Operation forbidden for built-in Quality Profile ‘FindBugs’ with language 'java’

I also see an outdated copy of each profile like below:

Does this mean that the database migration takes care of my old rules and adds them as an outdated copy ?
Or is there anyway I can restore my old rules on the newer version of Sonarqube 6.7.

Appreciate any help or suggestions.

Thanks,
Pranothi

Hi Pranothi,

In between those versions, we locked down built-in profiles, so what the error message is telling you is that you’re no longer allowed to update / modify / overwrite a profile that was provided directly by an analyzer.

What you should do instead is update the name in the XML file so that you’re no longer trying to overwrite a built-in profile.

Ann

Thanks for the quick response, Ann !

I just tried doing that and I am able to restore them. I think it will be nice to add this as a part of the documentation somewhere.

Appreciate your help !

For the record though:

Yes, Quality Profiles should definitely be smoothly handled throughout any SonarQube Upgrade. And yes the outdated copy corresponds to the Quality Profile you had in previous versions, only that it’s renamed to let room for the new concept of built-in profile.

1 Like