mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
bug - use new cancel/cutover api format (#19037)
* bug - use new cancel/cutover api format * fix telemetry bug with unregistered ir
This commit is contained in:
@@ -337,8 +337,9 @@ export async function getMigrationAsyncOperationDetails(account: azdata.Account,
|
||||
|
||||
export async function startMigrationCutover(account: azdata.Account, subscription: Subscription, migration: DatabaseMigration): Promise<any> {
|
||||
const api = await getAzureCoreAPI();
|
||||
const path = encodeURI(`${migration.id}/operations/${migration.properties.migrationOperationId}/cutover?api-version=2022-01-30-preview`);
|
||||
const response = await api.makeAzureRestRequest(account, subscription, path, azurecore.HttpRequestMethod.POST, undefined, true, undefined, undefined);
|
||||
const path = encodeURI(`${migration.id}/cutover?api-version=2022-01-30-preview`);
|
||||
const requestBody = { migrationOperationId: migration.properties.migrationOperationId };
|
||||
const response = await api.makeAzureRestRequest(account, subscription, path, azurecore.HttpRequestMethod.POST, requestBody, true, undefined, undefined);
|
||||
if (response.errors.length > 0) {
|
||||
throw new Error(response.errors.toString());
|
||||
}
|
||||
@@ -347,8 +348,9 @@ export async function startMigrationCutover(account: azdata.Account, subscriptio
|
||||
|
||||
export async function stopMigration(account: azdata.Account, subscription: Subscription, migration: DatabaseMigration): Promise<void> {
|
||||
const api = await getAzureCoreAPI();
|
||||
const path = encodeURI(`${migration.id}/operations/${migration.properties.migrationOperationId}/cancel?api-version=2022-01-30-preview`);
|
||||
const response = await api.makeAzureRestRequest(account, subscription, path, azurecore.HttpRequestMethod.POST, undefined, true, undefined, undefined);
|
||||
const path = encodeURI(`${migration.id}/cancel?api-version=2022-01-30-preview`);
|
||||
const requestBody = { migrationOperationId: migration.properties.migrationOperationId };
|
||||
const response = await api.makeAzureRestRequest(account, subscription, path, azurecore.HttpRequestMethod.POST, requestBody, true, undefined, undefined);
|
||||
if (response.errors.length > 0) {
|
||||
throw new Error(response.errors.toString());
|
||||
}
|
||||
|
||||
@@ -1628,7 +1628,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
|
||||
'targetDatabaseName': this._targetDatabaseNames[i],
|
||||
'serverName': this._targetServerInstance.name,
|
||||
'sqlMigrationServiceId': Buffer.from(this._sqlMigrationService?.id!).toString('base64'),
|
||||
'irRegistered': (this._nodeNames.length > 0).toString(),
|
||||
'irRegistered': (this._nodeNames?.length > 0).toString(),
|
||||
'wizardEntryPoint': wizardEntryPoint,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -431,9 +431,6 @@ export class IntergrationRuntimePage extends MigrationWizardPage {
|
||||
this.migrationStateModel._sqlMigrationService.location,
|
||||
this.migrationStateModel._sqlMigrationService!.name);
|
||||
|
||||
this.migrationStateModel._nodeNames = migrationServiceMonitoringStatus.nodes.map(
|
||||
node => node.nodeName);
|
||||
|
||||
const state = migrationService.properties.integrationRuntimeState;
|
||||
if (state === 'Online') {
|
||||
await this._dmsStatusInfoBox.updateProperties(<azdata.InfoBoxComponentProperties>{
|
||||
|
||||
Reference in New Issue
Block a user