add error banner for failed migration cutover and cancel migration (#17106)

This commit is contained in:
brian-harris
2021-09-21 23:31:36 -07:00
committed by GitHub
parent 4a715e473a
commit 155ea4c707
26 changed files with 250 additions and 224 deletions

View File

@@ -951,7 +951,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
}
);
MigrationLocalStorage.saveMigration(
await MigrationLocalStorage.saveMigration(
currentConnection!,
response.databaseMigration,
this._targetServerInstance,
@@ -961,15 +961,15 @@ export class MigrationStateModel implements Model, vscode.Disposable {
response.asyncUrl,
this._sessionId
);
vscode.window.showInformationMessage(localize("sql.migration.starting.migration.message", 'Starting migration for database {0} to {1} - {2}', this._migrationDbs[i], this._targetServerInstance.name, this._targetDatabaseNames[i]));
void vscode.window.showInformationMessage(localize("sql.migration.starting.migration.message", 'Starting migration for database {0} to {1} - {2}', this._migrationDbs[i], this._targetServerInstance.name, this._targetDatabaseNames[i]));
}
} catch (e) {
vscode.window.showErrorMessage(
void vscode.window.showErrorMessage(
localize('sql.migration.starting.migration.error', "An error occurred while starting the migration: '{0}'", e.message));
console.log(e);
}
vscode.commands.executeCommand('sqlmigration.refreshMigrationTiles');
await vscode.commands.executeCommand('sqlmigration.refreshMigrationTiles');
}
}
}