All quality profiles have no rules when SonarQube is upgraded to 5.4

六月ゝ 毕业季﹏ 提交于 2019-12-18 16:10:56

问题


We are currently running a production server at version 5.1.2 which we are planning to upgrade.

Tests have shown that upgrading to 5.3 works as expected.

However, upgrading from 5.1.2 -> 5.4 or 5.1.2 -> 5.3 -> 5.4 results in all quality profiles from the 5.1.2 instance becoming empty - no rules assigned at all.

Worse, backing up the rules and attempting to restore them fails silently.

Has anyone else experienced this? Is there a work-around?

Thanks in advance.


回答1:


The update instructions in the Administration view (System Upgrades) differ from the instructions here: Upgrading

I would change the first instructions as follows (in cursive text the changed/added lines) and I'd try to keep the Upgrading instructions in sync.

  1. Copy the list of installed plugins and stop your old SonarQube server.
  2. Download the new SonarQube version and start it on an empty DB (the bundled H2 DB for instance).
  3. Install (from the update center) the plugins you want.
  4. Install your custom plugins (if any).
  5. Update the conf/sonar.properties file to use the relevant configurations from your old instance, including the connection information for your production DB.
  6. Stop your new SonarQube server.
  7. Remove the following folders from the new SonarQube server: data, temp
  8. Start the new SonarQube instance: you're done!



回答2:


I had the same problem today migrating from 4.5.6 to 5.4. I managed to bypass the problem by reverting back to 4.5.6 and then migrating in the old fashion, i.e ignoring the new upgrade instructions.

Environment was Windows10/Postgresql4.3

Further investigation showed that I had missed a step in the new instructions, namely the deletion of the data/es directory.

I have run the migration a number of times and if I run up the default H2 database in order to verify and update plugins but forget to delete the data/es directory prior to switching to postgresql, then the quality profiles end up with zero rules, but if I follow the instructions correctly then the profiles are migrated correctly.

Please check your procedures against http://docs.sonarqube.org/display/SONAR/Upgrading

Hope this helps



来源:https://stackoverflow.com/questions/36063174/all-quality-profiles-have-no-rules-when-sonarqube-is-upgraded-to-5-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!