Browse Source

SONAR-12141 Database needs migration : misleading instruction message

tags/7.8
Duarte Meneses 5 years ago
parent
commit
ced6360cc4

+ 2
- 1
server/sonar-server/src/main/java/org/sonar/server/platform/DatabaseServerCompatibility.java View File

@@ -55,7 +55,8 @@ public class DatabaseServerCompatibility implements Startable {
}
boolean blueGreen = configuration.getBoolean(ProcessProperties.Property.BLUE_GREEN_ENABLED.getKey()).orElse(false);
if (!blueGreen) {
String msg = "Database must be upgraded. Please backup database and browse /setup";
String msg = "The database must be manually upgraded. Please backup the database and browse /setup. "
+ "For more information: https://docs.sonarqube.org/latest/setup/upgrading";
Loggers.get(DatabaseServerCompatibility.class).warn(msg);
Loggers.get(STARTUP_LOGGER_NAME).warn('\n'
+ HIGHLIGHTER + '\n'

+ 1
- 1
server/sonar-server/src/main/java/org/sonar/server/platform/Platform.java View File

@@ -107,7 +107,7 @@ public class Platform {

// if AutoDbMigration kicked in or no DB migration was required, startup can be resumed in another thread
if (dbRequiresMigration()) {
LOGGER.info("Database needs migration");
LOGGER.info("Database needs to be migrated. Please refer to https://docs.sonarqube.org/latest/setup/upgrading");
} else {
this.autoStarter = autoStarterSupplier.get();
this.autoStarter.execute(new AutoStarterRunnable(autoStarter) {

+ 4
- 2
server/sonar-server/src/test/java/org/sonar/server/platform/DatabaseServerCompatibilityTest.java View File

@@ -74,9 +74,11 @@ public class DatabaseServerCompatibilityTest {

assertThat(logTester.logs()).hasSize(2);
assertThat(logTester.logs(LoggerLevel.WARN)).contains(
"Database must be upgraded. Please backup database and browse /setup",
"The database must be manually upgraded. Please backup the database and browse /setup. "
+ "For more information: https://docs.sonarqube.org/latest/setup/upgrading",
"\n################################################################################\n" +
" Database must be upgraded. Please backup database and browse /setup\n" +
" The database must be manually upgraded. Please backup the database and browse /setup. "
+ "For more information: https://docs.sonarqube.org/latest/setup/upgrading\n" +
"################################################################################");
}


Loading…
Cancel
Save