my company is moving our Sonar from Community Edition Version 7.7 to Developer Edition Version 8.4. We are now trying to import our Quality Profile (from the language Java) from the old to the new Edition/Version. As we did this, we found out that our old Sonar (Community Edition Version 7.7) has 1.9k rules, whereas the new one (Developer Edition Version 8.4) only has 564 rules. Therefore, many old rules in our profile couldn’t be successfully import into the new version.
We’ve already checked the release notes between version 7.7 to 8.4, but couldn’t find any clue about why many of the rules were eliminated and how can we deal with this situation.
Welcome to the community!
Since 8.2 is the latest release, and 8.4 isn’t expected until the summer, you’re clearly visiting from the future, so do you mind sharing how this COVID-19 stuff turns out?
On a more serious note, you shouldn’t have to “restore” either rules or profiles. Can you share the upgrade procedure you’re using? Because it should be this, and you shouldn’t be encountering any loss of rules.
Thank you for your reply. I’m not resposible for the server upgrade. My collegue is working on it.
We still have one question: Can we then import the rules from Version 7.7 to 8.2?
My answer is the same: you don’t have to. If you’re doing the upgrade right, they’re already there.
Perhaps you should invite your colleague to this thread.
The problem is: our admins have set up a new Sonar server (developer edition, v8.2) for new projects. We now want to import the rules from the existing server (which is the community edition, v7.7). So it is not really an update here.
Welcome to the community!
Your admins should have started from the same database, or at the very least, a backup of the current database (if they didn’t want to interrupt current functionality while they tested the upgrade).
Again, there is no need to import rules. You download the bundle, unzip it, and the rules should be in place already. If you’re starting from a fresh instance/database, you may need to do some work to perpetuate the Quality Profiles. But the rules should be there.
Now there is the case that your CE version is using some extra, community-provided analyzers. In that case, without (re)loading those extra analyzers into your new instance, you will be missing those rules until the extra analyzers are added back in. But the earlier statement of 564 rules total across the whole (new) instance indicates to me an underlying problem with the procedure. Because an un-tampered-with version of CE provides several times that number at first startup.