Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898 (#15681)

* Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898

* Fixes and cleanup

* Distro

* Fix hygiene yarn

* delete no yarn lock changes file

* Fix hygiene

* Fix layer check

* Fix CI

* Skip lib checks

* Remove tests deleted in vs code

* Fix tests

* Distro

* Fix tests and add removed extension point

* Skip failing notebook tests for now

* Disable broken tests and cleanup build folder

* Update yarn.lock and fix smoke tests

* Bump sqlite

* fix contributed actions and file spacing

* Fix user data path

* Update yarn.locks

Co-authored-by: ADS Merger <karlb@microsoft.com>
This commit is contained in:
Charles Gagnon
2021-06-17 08:17:11 -07:00
committed by GitHub
parent fdcb97c7f7
commit 3cb2f552a6
2582 changed files with 124827 additions and 87099 deletions

View File

@@ -177,7 +177,7 @@ export class DeployAzureSQLDBWizardModel extends ResourceTypeModel {
}
}
public getCodeCellContentForNotebook(): string[] {
public override getCodeCellContentForNotebook(): string[] {
const statements: string[] = [];
statements.push(`azure_sqldb_subscription = '${this.azureSubscription}'`);

View File

@@ -137,7 +137,7 @@ export class AzureSettingsPage extends BasePage {
});
}
public async onEnter(): Promise<void> {
public override async onEnter(): Promise<void> {
this.wizard.wizardObject.registerNavigationValidator(async (pcInfo) => {
if (pcInfo.newPage < pcInfo.lastPage) {
return true;
@@ -151,7 +151,7 @@ export class AzureSettingsPage extends BasePage {
});
}
public async onLeave(): Promise<void> {
public override async onLeave(): Promise<void> {
this.wizard.wizardObject.registerNavigationValidator((pcInfo) => {
return true;
});

View File

@@ -6,5 +6,5 @@
import { ResourceTypePage } from '../../resourceTypePage';
export abstract class BasePage extends ResourceTypePage {
public abstract initialize(): void;
public abstract override initialize(): void;
}

View File

@@ -85,7 +85,7 @@ export class DatabaseSettingsPage extends BasePage {
});
}
public async onEnter(): Promise<void> {
public override async onEnter(): Promise<void> {
this.wizard.wizardObject.registerNavigationValidator(async (pcInfo) => {
if (pcInfo.newPage < pcInfo.lastPage) {
return true;
@@ -99,7 +99,7 @@ export class DatabaseSettingsPage extends BasePage {
});
}
public async onLeave(): Promise<void> {
public override async onLeave(): Promise<void> {
this.wizard.wizardObject.registerNavigationValidator((pcInfo) => {
return true;
});

View File

@@ -26,7 +26,7 @@ export class AzureSQLDBSummaryPage extends BasePage {
}
public async initialize() {
public override async initialize() {
this.pageObject.registerContent(async (view: azdata.ModelView) => {
this._view = view;
this._form = view.modelBuilder.formContainer();
@@ -34,7 +34,7 @@ export class AzureSQLDBSummaryPage extends BasePage {
});
}
public async onEnter(): Promise<void> {
public override async onEnter(): Promise<void> {
this.formItems.forEach(item => {
this._form.removeFormItem(item);
@@ -197,7 +197,7 @@ export class AzureSQLDBSummaryPage extends BasePage {
});
}
public async onLeave(): Promise<void> {
public override async onLeave(): Promise<void> {
this.wizard.wizardObject.registerNavigationValidator((pcInfo) => {
return true;
});

View File

@@ -240,7 +240,7 @@ export class DeployAzureSQLVMWizardModel extends ResourceTypeModel {
}
public getCodeCellContentForNotebook(): string[] {
public override getCodeCellContentForNotebook(): string[] {
const statements: string[] = [];
statements.push('import os');

View File

@@ -46,7 +46,7 @@ export class AzureSettingsPage extends BasePage {
this._subscriptionsMap = new Map();
}
public async initialize() {
public override async initialize() {
this.pageObject.registerContent(async (view: azdata.ModelView) => {
await Promise.all([
@@ -86,13 +86,13 @@ export class AzureSettingsPage extends BasePage {
});
}
public async onEnter(): Promise<void> {
public override async onEnter(): Promise<void> {
this._model.wizard.wizardObject.registerNavigationValidator((pcInfo) => {
return true;
});
}
public async onLeave(): Promise<void> {
public override async onLeave(): Promise<void> {
this._model.wizard.wizardObject.registerNavigationValidator((pcInfo) => {
return true;
});

View File

@@ -45,7 +45,7 @@ export class NetworkSettingsPage extends BasePage {
);
}
public async initialize() {
public override async initialize() {
this.pageObject.registerContent(async (view: azdata.ModelView) => {
await Promise.all([
@@ -84,7 +84,7 @@ export class NetworkSettingsPage extends BasePage {
});
}
public async onEnter(): Promise<void> {
public override async onEnter(): Promise<void> {
this.populateVirtualNetworkDropdown();
this.populatePublicIpkDropdown();
this.liveValidation = false;
@@ -102,7 +102,7 @@ export class NetworkSettingsPage extends BasePage {
});
}
public async onLeave(): Promise<void> {
public override async onLeave(): Promise<void> {
this._model.wizard.wizardObject.registerNavigationValidator((pcInfo) => {
return true;
});
@@ -448,7 +448,7 @@ export class NetworkSettingsPage extends BasePage {
return dropdownValues;
}
protected async validatePage(): Promise<string> {
protected override async validatePage(): Promise<string> {
const errorMessages = [];
if (this._model.newVirtualNetwork === 'True') {
if (this._model.virtualNetworkName.length < 2 || this._model.virtualNetworkName.length > 64) {

View File

@@ -38,7 +38,7 @@ export class SqlServerSettingsPage extends BasePage {
}
public async initialize() {
public override async initialize() {
this.pageObject.registerContent(async (view: azdata.ModelView) => {
await Promise.all([
@@ -80,7 +80,7 @@ export class SqlServerSettingsPage extends BasePage {
});
}
public async onEnter(): Promise<void> {
public override async onEnter(): Promise<void> {
this.liveValidation = false;
@@ -100,7 +100,7 @@ export class SqlServerSettingsPage extends BasePage {
});
}
public async onLeave(): Promise<void> {
public override async onLeave(): Promise<void> {
this._model.wizard.wizardObject.registerNavigationValidator((pcInfo) => {
return true;
});
@@ -220,7 +220,7 @@ export class SqlServerSettingsPage extends BasePage {
}
protected async validatePage(): Promise<string> {
protected override async validatePage(): Promise<string> {
const errorMessages = [];

View File

@@ -25,7 +25,7 @@ export class AzureSQLVMSummaryPage extends BasePage {
}
public async initialize() {
public override async initialize() {
this.pageObject.registerContent(async (view: azdata.ModelView) => {
this._view = view;
this._form = view.modelBuilder.formContainer();
@@ -33,7 +33,7 @@ export class AzureSQLVMSummaryPage extends BasePage {
});
}
public async onEnter(): Promise<void> {
public override async onEnter(): Promise<void> {
this.formItems.forEach(item => {
this._form.removeFormItem(item);
@@ -297,7 +297,7 @@ export class AzureSQLVMSummaryPage extends BasePage {
});
}
public async onLeave(): Promise<void> {
public override async onLeave(): Promise<void> {
this.wizard.wizardObject.registerNavigationValidator((pcInfo) => {
return true;
});

View File

@@ -50,7 +50,7 @@ export class VmSettingsPage extends BasePage {
);
}
public async initialize() {
public override async initialize() {
this.pageObject.registerContent(async (view: azdata.ModelView) => {
await Promise.all([
@@ -110,7 +110,7 @@ export class VmSettingsPage extends BasePage {
});
}
public async onEnter(): Promise<void> {
public override async onEnter(): Promise<void> {
this.populateVmImageDropdown();
this.populateVmSizeDropdown();
@@ -132,7 +132,7 @@ export class VmSettingsPage extends BasePage {
});
}
public async onLeave(): Promise<void> {
public override async onLeave(): Promise<void> {
this.wizard.wizardObject.registerNavigationValidator((pcInfo) => {
return true;
});
@@ -388,7 +388,7 @@ export class VmSettingsPage extends BasePage {
this._vmSizeDropdown.loading = false;
}
protected async validatePage(): Promise<string> {
protected override async validatePage(): Promise<string> {
const errorMessages = [];
/**

View File

@@ -129,7 +129,7 @@ export class DeployClusterWizardModel extends ResourceTypeModel {
this.setStorageSettingValue(VariableNames.SQLServerLogsStorageSize_VariableName, VariableNames.ControllerLogsStorageSize_VariableName);
}
public setEnvironmentVariables(): void {
public override setEnvironmentVariables(): void {
this.setStorageSettingValues();
}
@@ -215,7 +215,7 @@ export class DeployClusterWizardModel extends ResourceTypeModel {
return targetDeploymentProfile;
}
public getCodeCellContentForNotebook(tools: ITool[]): string[] {
public override getCodeCellContentForNotebook(tools: ITool[]): string[] {
const profile = this.createTargetProfile();
const statements: string[] = [];
if (this.deploymentType === BdcDeploymentType.NewAKS) {

View File

@@ -159,7 +159,7 @@ export class AzureSettingsPage extends ResourceTypePage {
});
}
public async onEnter(): Promise<void> {
public override async onEnter(): Promise<void> {
this.wizard.wizardObject.registerNavigationValidator((pcInfo) => {
this.wizard.wizardObject.message = { text: '' };
if (pcInfo.newPage > pcInfo.lastPage) {
@@ -177,7 +177,7 @@ export class AzureSettingsPage extends ResourceTypePage {
});
}
public async onLeave(): Promise<void> {
public override async onLeave(): Promise<void> {
this.wizard.wizardObject.registerNavigationValidator((pcInfo) => {
return true;
});

View File

@@ -294,7 +294,7 @@ export class ClusterSettingsPage extends ResourceTypePage {
});
}
public async onLeave(): Promise<void> {
public override async onLeave(): Promise<void> {
await setModelValues(this.inputComponents, this.wizard.model);
if (this._model.authenticationMode === AuthenticationMode.ActiveDirectory) {
const variableDNSPrefixMapping: { [s: string]: string } = {};
@@ -315,7 +315,7 @@ export class ClusterSettingsPage extends ResourceTypePage {
});
}
public async onEnter(): Promise<void> {
public override async onEnter(): Promise<void> {
getInputBoxComponent(VariableNames.DockerRegistry_VariableName, this.inputComponents).value = this.wizard.model.getStringValue(VariableNames.DockerRegistry_VariableName);
getInputBoxComponent(VariableNames.DockerRepository_VariableName, this.inputComponents).value = this.wizard.model.getStringValue(VariableNames.DockerRepository_VariableName);
getInputBoxComponent(VariableNames.DockerImageTag_VariableName, this.inputComponents).value = this.wizard.model.getStringValue(VariableNames.DockerImageTag_VariableName);

View File

@@ -216,7 +216,7 @@ export class DeploymentProfilePage extends ResourceTypePage {
.component();
}
public async onEnter(): Promise<void> {
public override async onEnter(): Promise<void> {
this.wizard.wizardObject.registerNavigationValidator((pcInfo) => {
this.wizard.wizardObject.message = { text: '' };
if (pcInfo.newPage > pcInfo.lastPage) {
@@ -233,7 +233,7 @@ export class DeploymentProfilePage extends ResourceTypePage {
});
}
public async onLeave(): Promise<void> {
public override async onLeave(): Promise<void> {
this.wizard.wizardObject.registerNavigationValidator((pcInfo) => {
return true;
});

View File

@@ -344,7 +344,7 @@ export class ServiceSettingsPage extends ResourceTypePage {
};
}
public async onEnter(): Promise<void> {
public override async onEnter(): Promise<void> {
this.setInputBoxValue(VariableNames.ComputePoolScale_VariableName);
this.setInputBoxValue(VariableNames.DataPoolScale_VariableName);
this.setInputBoxValue(VariableNames.HDFSPoolScale_VariableName);
@@ -421,7 +421,7 @@ export class ServiceSettingsPage extends ResourceTypePage {
});
}
public async onLeave(): Promise<void> {
public override async onLeave(): Promise<void> {
await setModelValues(this.inputComponents, this.wizard.model);
this.wizard.wizardObject.registerNavigationValidator((pcInfo) => {
return true;

View File

@@ -29,7 +29,7 @@ export class SummaryPage extends ResourceTypePage {
});
}
public async onEnter(): Promise<void> {
public override async onEnter(): Promise<void> {
this._model.showCustomButtons();
this.formItems.forEach(item => {
this.form!.removeFormItem(item);
@@ -325,7 +325,7 @@ export class SummaryPage extends ResourceTypePage {
this.form.addFormItems(this.formItems);
}
public async onLeave(): Promise<void> {
public override async onLeave(): Promise<void> {
this._model.hideCustomButtons();
this.wizard.wizardObject.message = { text: '' };
}

View File

@@ -51,7 +51,7 @@ export class TargetClusterContextPage extends ResourceTypePage {
});
}
public async onEnter(): Promise<void> {
public override async onEnter(): Promise<void> {
if (this.loadDefaultKubeConfigFile) {
let defaultKubeConfigPath = this._model.kubeService.getDefaultConfigPath();
this.loadClusterContexts(defaultKubeConfigPath);
@@ -74,7 +74,7 @@ export class TargetClusterContextPage extends ResourceTypePage {
});
}
public async onLeave(): Promise<void> {
public override async onLeave(): Promise<void> {
this.wizard.wizardObject.registerNavigationValidator((e) => {
return true;
});

View File

@@ -94,7 +94,7 @@ export class DeploymentInputDialog extends DialogBase {
});
}
protected async onComplete(): Promise<void> {
protected override async onComplete(): Promise<void> {
const model: Model = new Model();
await setModelValues(this.inputComponents, model);
if (instanceOfNotebookBasedDialogInfo(this.dialogInfo)) {

View File

@@ -25,7 +25,7 @@ export class NotebookWizardAutoSummaryPage extends NotebookWizardPage {
);
}
public initialize(): void {
public override initialize(): void {
this.pageObject.registerContent((view: azdata.ModelView) => {
this.view = view;
this.form = view.modelBuilder.formContainer();
@@ -33,11 +33,11 @@ export class NotebookWizardAutoSummaryPage extends NotebookWizardPage {
});
}
public async onLeave(): Promise<void> {
public override async onLeave(): Promise<void> {
this.wizard.wizardObject.message = { text: '' };
}
public async onEnter(): Promise<void> {
public override async onEnter(): Promise<void> {
this.formItems.forEach(item => {
this.form!.removeFormItem(item);
});

View File

@@ -58,7 +58,7 @@ export class NotebookWizardModel extends ResourceTypeModel {
/**
* Generates the notebook and returns true if generation was done and so the wizard should be closed.
**/
public async onGenerateScript(): Promise<boolean> {
public override async onGenerateScript(): Promise<boolean> {
const lastPage = this.wizard.lastPage! as NotebookWizardPage;
if (lastPage.validatePage()) {
let notebook: Notebook | undefined;

View File

@@ -73,14 +73,14 @@ export class NotebookWizardPage extends ResourceTypePage {
});
}
public async onLeave(): Promise<void> {
public override async onLeave(): Promise<void> {
// The following callback registration clears previous navigation validators.
this.wizard.wizardObject.registerNavigationValidator((pcInfo) => {
return true;
});
}
public async onEnter(pageInfo: WizardPageInfo): Promise<void> {
public override async onEnter(pageInfo: WizardPageInfo): Promise<void> {
if (pageInfo.isLastPage) {
// on the last page either one or both of done button and generateScript button are visible depending on configuration of 'runNotebook' in wizard info
this.wizard.wizardObject.doneButton.hidden = !this.isDoneButtonVisible;

View File

@@ -189,7 +189,7 @@ export class ResourceTypePickerDialog extends DialogBase {
this._selectedResourceType = resourceType;
}
protected async onComplete(): Promise<void> {
protected override async onComplete(): Promise<void> {
this.resourceTypeService.startDeployment(this._selectedResourceType, this._optionValuesFilter, this._initialVariableValues);
}

View File

@@ -45,7 +45,7 @@ export class ToolsAndEulaPage extends ResourceTypePage {
this._resourceType = wizard.resourceType;
}
public async onEnter(): Promise<void> {
public override async onEnter(): Promise<void> {
this.wizard.wizardObject.generateScriptButton.hidden = true;
this.wizard.wizardObject.registerNavigationValidator(async (pcInfo) => {
for (let i = 0; i < this._tools.length; i++) {
@@ -294,7 +294,7 @@ export class ToolsAndEulaPage extends ResourceTypePage {
this.wizard.wizardObject.message = { text: '' };
let eulaAccepted = true;
for (const tool of this._tools) {
eulaAccepted = tool.isEulaAccepted() || await tool.promptForEula();
eulaAccepted = await tool.isEulaAccepted() || await tool.promptForEula();
if (!eulaAccepted) {
this.wizard.wizardObject.message = {
level: azdata.window.MessageLevel.Error,
@@ -415,14 +415,14 @@ export class ToolsAndEulaPage extends ResourceTypePage {
this.wizard.wizardObject.cancelButton.enabled = enable;
}
public async onLeave(): Promise<void> {
public override async onLeave(): Promise<void> {
this.toolsService.toolsForCurrentProvider = this._tools;
}
private areToolsEulaAccepted(): boolean {
private async areToolsEulaAccepted(): Promise<boolean> {
// we run 'map' on each tool before doing 'every' so that we collect eula messages for all tools (instead of bailing out after 1st failure)
this._eulaValidationSucceeded = this._tools.map(tool => {
const eulaAccepted = tool.isEulaAccepted();
this._eulaValidationSucceeded = (await Promise.all(this._tools.map(async tool => {
const eulaAccepted = await tool.isEulaAccepted();
if (!eulaAccepted) {
this.wizard.wizardObject.message = {
level: azdata.window.MessageLevel.Error,
@@ -430,7 +430,7 @@ export class ToolsAndEulaPage extends ResourceTypePage {
};
}
return eulaAccepted;
}).every(isEulaAccepted => isEulaAccepted);
}))).every(isEulaAccepted => isEulaAccepted);
return this._eulaValidationSucceeded;
}
@@ -507,8 +507,13 @@ export class ToolsAndEulaPage extends ResourceTypePage {
text: infoText.join(EOL)
};
} else if (!this.areToolsEulaAccepted()) {
this.wizard.wizardObject.doneButton.label = loc.acceptEulaAndSelect;
this.wizard.wizardObject.nextButton.label = loc.acceptEulaAndSelect;
this.areToolsEulaAccepted().then(toolsEulaAccepted => {
if (!toolsEulaAccepted) {
this.wizard.wizardObject.doneButton.label = loc.acceptEulaAndSelect;
this.wizard.wizardObject.nextButton.label = loc.acceptEulaAndSelect;
}
});
}
this._toolsLoadingComponent.loading = false;
}

View File

@@ -124,20 +124,20 @@ export class RegexValidation extends Validation {
}
export abstract class Comparison extends Validation {
protected _target: string; // comparison object requires a target so override the base optional setting.
protected override _target: string; // comparison object requires a target so override the base optional setting.
protected _ensureOnTargetValidityChangeListenerAdded = false;
get target(): string {
override get target(): string {
return this._target;
}
protected onTargetValidityChanged(onTargetValidityChangedAction: (e: boolean) => Promise<void>): void {
const onValidityChanged = this._onTargetValidityChangedGetter(this.target);
this._onNewDisposableCreated(onValidityChanged(isValid => onTargetValidityChangedAction(isValid)));
const onValidityChanged = this._onTargetValidityChangedGetter!(this.target);
this._onNewDisposableCreated!(onValidityChanged(isValid => onTargetValidityChangedAction(isValid)));
}
constructor(validation: ComparisonValidationInfo, onValidation: OnValidation, valueGetter: ValueGetter, targetValueGetter: TargetValueGetter, protected _onTargetValidityChangedGetter: OnTargetValidityChangedGetter, protected _onNewDisposableCreated: (disposable: vscode.Disposable) => void) {
super(validation, onValidation, valueGetter, targetValueGetter);
constructor(validation: ComparisonValidationInfo, onValidation: OnValidation, valueGetter: ValueGetter, targetValueGetter: TargetValueGetter, onTargetValidityChangedGetter: OnTargetValidityChangedGetter, onNewDisposableCreated: (disposable: vscode.Disposable) => void) {
super(validation, onValidation, valueGetter, targetValueGetter, onTargetValidityChangedGetter, onNewDisposableCreated);
throwUnless(validation.target !== undefined);
this._target = validation.target;
}