mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 09:35:36 -05:00
Fixed: (#16594)
Summary label DMS creation retry times DMS dropdown resetting
This commit is contained in:
@@ -177,7 +177,7 @@ export async function createSqlMigrationService(account: azdata.Account, subscri
|
||||
throw new Error(response.errors.toString());
|
||||
}
|
||||
const asyncUrl = response.response.headers['azure-asyncoperation'];
|
||||
const maxRetry = 5;
|
||||
const maxRetry = 24;
|
||||
let i = 0;
|
||||
for (i = 0; i < maxRetry; i++) {
|
||||
const asyncResponse = await api.makeAzureRestRequest(account, subscription, asyncUrl.replace('https://management.azure.com/', ''), azurecore.HttpRequestMethod.GET, undefined, true, undefined, getSessionIdHeader(sessionId));
|
||||
@@ -187,7 +187,7 @@ export async function createSqlMigrationService(account: azdata.Account, subscri
|
||||
} else if (creationStatus === ProvisioningState.Failed) {
|
||||
throw new Error(asyncResponse.errors.toString());
|
||||
}
|
||||
await new Promise(resolve => setTimeout(resolve, 3000)); //adding 3 sec delay before getting creation status
|
||||
await new Promise(resolve => setTimeout(resolve, 5000)); //adding 5 sec delay before getting creation status
|
||||
}
|
||||
if (i === maxRetry) {
|
||||
throw new Error(constants.DMS_PROVISIONING_FAILED);
|
||||
|
||||
@@ -76,7 +76,7 @@ export class CreateSqlMigrationServiceDialog {
|
||||
|
||||
|
||||
const subscription = this._model._targetSubscription;
|
||||
const resourceGroup = (this.migrationServiceResourceGroupDropdown.value as azdata.CategoryValue).name;
|
||||
const resourceGroup = (this.migrationServiceResourceGroupDropdown.value as azdata.CategoryValue)?.name;
|
||||
const location = this._model._targetServerInstance.location;
|
||||
const serviceName = this.migrationServiceNameText.value;
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
|
||||
public _targetDatabaseNames!: string[];
|
||||
|
||||
public _sqlMigrationServiceResourceGroup!: string;
|
||||
public _sqlMigrationService!: SqlMigrationService;
|
||||
public _sqlMigrationService!: SqlMigrationService | undefined;
|
||||
public _sqlMigrationServices!: SqlMigrationService[];
|
||||
public _nodeNames!: string[];
|
||||
|
||||
@@ -924,7 +924,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
|
||||
'serverName': this._targetServerInstance.name,
|
||||
'tenantId': this._azureAccount.properties.tenants[0].id,
|
||||
'location': this._targetServerInstance.location,
|
||||
'sqlMigrationServiceId': Buffer.from(this._sqlMigrationService.id).toString('base64'),
|
||||
'sqlMigrationServiceId': Buffer.from(this._sqlMigrationService?.id!).toString('base64'),
|
||||
'irRegistered': (this._nodeNames.length > 0).toString()
|
||||
},
|
||||
{
|
||||
@@ -937,7 +937,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
|
||||
this._targetServerInstance,
|
||||
this._azureAccount,
|
||||
this._targetSubscription,
|
||||
this._sqlMigrationService,
|
||||
this._sqlMigrationService!,
|
||||
response.asyncUrl,
|
||||
this._sessionId
|
||||
);
|
||||
|
||||
@@ -105,8 +105,8 @@ export class IntergrationRuntimePage extends MigrationWizardPage {
|
||||
|
||||
this._subscription.value = this.migrationStateModel._targetSubscription.name;
|
||||
this._location.value = await getLocationDisplayName(this.migrationStateModel._targetServerInstance.location);
|
||||
this._dmsInfoContainer.display = (this.migrationStateModel._databaseBackup.networkContainerType === NetworkContainerType.NETWORK_SHARE && this.migrationStateModel._sqlMigrationService) ? 'inline' : 'none';
|
||||
this.loadResourceGroupDropdown();
|
||||
this._dmsInfoContainer.display = (this.migrationStateModel._databaseBackup.networkContainerType === NetworkContainerType.NETWORK_SHARE) ? 'inline' : 'none';
|
||||
this.wizard.registerNavigationValidator((pageChangeInfo) => {
|
||||
if (pageChangeInfo.newPage < pageChangeInfo.lastPage) {
|
||||
this.wizard.message = {
|
||||
@@ -114,7 +114,7 @@ export class IntergrationRuntimePage extends MigrationWizardPage {
|
||||
};
|
||||
return true;
|
||||
}
|
||||
const state = this.migrationStateModel._sqlMigrationService.properties.integrationRuntimeState;
|
||||
const state = this.migrationStateModel._sqlMigrationService?.properties?.integrationRuntimeState;
|
||||
if (!this.migrationStateModel._sqlMigrationService) {
|
||||
this.wizard.message = {
|
||||
level: azdata.window.MessageLevel.Error,
|
||||
@@ -196,6 +196,7 @@ export class IntergrationRuntimePage extends MigrationWizardPage {
|
||||
|
||||
this._disposables.push(this._resourceGroupDropdown.onValueChanged(async (value) => {
|
||||
const selectedIndex = findDropDownItemIndex(this._resourceGroupDropdown, value);
|
||||
this.migrationStateModel._sqlMigrationServiceResourceGroup = this.migrationStateModel.getAzureResourceGroup(selectedIndex).name;
|
||||
if (selectedIndex > -1) {
|
||||
await this.populateDms(value);
|
||||
}
|
||||
@@ -225,11 +226,10 @@ export class IntergrationRuntimePage extends MigrationWizardPage {
|
||||
text: ''
|
||||
};
|
||||
const selectedIndex = findDropDownItemIndex(this._dmsDropdown, value);
|
||||
if (selectedIndex > -1) {
|
||||
this.migrationStateModel._sqlMigrationService = this.migrationStateModel.getMigrationService(selectedIndex);
|
||||
await this.loadMigrationServiceStatus();
|
||||
}
|
||||
this.migrationStateModel._sqlMigrationService = this.migrationStateModel.getMigrationService(selectedIndex);
|
||||
await this.loadMigrationServiceStatus();
|
||||
} else {
|
||||
this.migrationStateModel._sqlMigrationService = undefined;
|
||||
this._dmsInfoContainer.display = 'none';
|
||||
}
|
||||
}));
|
||||
|
||||
@@ -108,10 +108,9 @@ export class SummaryPage extends MigrationWizardPage {
|
||||
|
||||
createHeadingTextComponent(this._view, constants.IR_PAGE_TITLE),
|
||||
createInformationRow(this._view, constants.SUBSCRIPTION, this.migrationStateModel._targetSubscription.name),
|
||||
createInformationRow(this._view, constants.LOCATION, this.migrationStateModel._sqlMigrationService.location),
|
||||
createInformationRow(this._view, constants.SUBSCRIPTION, this.migrationStateModel._sqlMigrationService.properties.resourceGroup),
|
||||
createInformationRow(this._view, constants.IR_PAGE_TITLE, this.migrationStateModel._targetSubscription.name),
|
||||
createInformationRow(this._view, constants.SUBSCRIPTION, this.migrationStateModel._sqlMigrationService.name)
|
||||
createInformationRow(this._view, constants.LOCATION, this.migrationStateModel._sqlMigrationService?.location!),
|
||||
createInformationRow(this._view, constants.RESOURCE_GROUP, this.migrationStateModel._sqlMigrationService?.properties?.resourceGroup!),
|
||||
createInformationRow(this._view, constants.IR_PAGE_TITLE, this.migrationStateModel._sqlMigrationService?.name!)
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user