fix: Modified upgrade path error for v1.9.2 (#19865)

Fixes #19862
This commit is contained in:
Nidhi 2023-01-18 14:39:50 +05:30 committed by GitHub
parent 2a6deacbed
commit 9e79b76403
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -95,16 +95,18 @@ public class InstanceConfig implements ApplicationListener<ApplicationReadyEvent
private AppsmithException populateSchemaMismatchError(Integer currentInstanceSchemaVersion) {
List<String> versions = new LinkedList<>();
List<String> docs = new LinkedList<>();
// Keep adding version numbers that brought in breaking instance schema migrations here
switch (currentInstanceSchemaVersion) {
// Example, we expect that in v1.8.14, all instances will have been migrated to instanceSchemaVer 2
case 1:
versions.add("v1.9.1");
versions.add("v1.9.2");
docs.add("https://docs.appsmith.com/help-and-support/troubleshooting-guide/deployment-errors#server-shuts-down-with-schema-mismatch-error");
default:
}
return new AppsmithException(AppsmithError.SCHEMA_MISMATCH_ERROR, versions);
return new AppsmithException(AppsmithError.SCHEMA_MISMATCH_ERROR, versions, docs);
}
private Mono<? extends Config> registerInstance() {

View File

@ -151,7 +151,7 @@ public enum AppsmithError {
ENV_FILE_NOT_FOUND(500, 5019, "Admin Settings is unavailable. Unable to read and write to Environment file.", AppsmithErrorAction.DEFAULT, null, ErrorType.CONFIGURATION_ERROR, null),
PUBLIC_APP_NO_PERMISSION_GROUP(500, 5020, "Invalid state. Public application does not have the required roles set for public access. Please reach out to Appsmith customer support to resolve this.", AppsmithErrorAction.LOG_EXTERNALLY, null, ErrorType.INTERNAL_ERROR, null),
RTS_SERVER_ERROR(500, 5021, "RTS server error while processing request: {0}", AppsmithErrorAction.LOG_EXTERNALLY, null, ErrorType.INTERNAL_ERROR, null),
SCHEMA_MISMATCH_ERROR(500, 5022, "Looks like you skipped some required update(s), please go back to the mandatory upgrade path {0}, or refer to ''https://docs.appsmith.com/'' for more info", AppsmithErrorAction.LOG_EXTERNALLY, null, ErrorType.INTERNAL_ERROR, null),
SCHEMA_MISMATCH_ERROR(500, 5022, "Looks like you skipped some required update(s), please go back to the mandatory upgrade path {0}, or refer to {1} for more info", AppsmithErrorAction.LOG_EXTERNALLY, null, ErrorType.INTERNAL_ERROR, null),
SCHEMA_VERSION_NOT_FOUND_ERROR(500, 5023, "Could not find mandatory instance schema version config. Please reach out to Appsmith customer support to resolve this.", AppsmithErrorAction.LOG_EXTERNALLY, null, ErrorType.INTERNAL_ERROR, null),
SERVER_NOT_READY(500, 5024, "Appsmith server is not ready. Please try again in some time.", AppsmithErrorAction.LOG_EXTERNALLY, null, ErrorType.INTERNAL_ERROR, null),
SESSION_BAD_STATE(500, 5025, "User session is invalid. Please log out and log in again.", AppsmithErrorAction.LOG_EXTERNALLY, null, ErrorType.INTERNAL_ERROR, null)