Add Azure Resource 'Sql' to MSSQL extension. (#21600)

This commit is contained in:
Cheena Malhotra
2023-01-20 13:08:38 -08:00
committed by GitHub
parent 4971a94244
commit b3acef3124
4 changed files with 55 additions and 1 deletions

View File

@@ -26,6 +26,10 @@ const ConnectionProviderContrib: IJSONSchema = {
type: 'string',
description: localize('schema.displayName', "Display Name for the provider")
},
azureResource: {
type: 'string',
description: localize('schema.azureResource', "Azure resource endpoint for the provider.")
},
notebookKernelAlias: {
type: 'string',
description: localize('schema.notebookKernelAlias', "Notebook Kernel Alias for the provider")

View File

@@ -833,7 +833,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
// default to SQL if there are no provides or registered resources
let provider = this._providers.get(connection.providerName);
if (!provider || !provider.properties || !provider.properties.azureResource) {
this._logService.warn('Connection providers incorrectly registered. Defaulting to SQL Azure resource,');
this._logService.warn(`Connection provider '${connection.providerName}' is incorrectly registered, defaulting to 'SQL' Azure resource. Provider must specify applicable 'azureResource' in 'connectionProvider' configuration.`);
return AzureResource.Sql;
}