mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add app quality to extension API (#20731)
* Add app quality to extension API * Comment * Special case rc1 to stable
This commit is contained in:
@@ -128,11 +128,10 @@ export async function getParallelMessageProcessingConfig(): Promise<boolean> {
|
||||
if (!config) {
|
||||
return false;
|
||||
}
|
||||
const quality = await getProductQuality();
|
||||
const setting = config.inspect(parallelMessageProcessingConfig);
|
||||
// For dev environment, we want to enable the feature by default unless it is set explicitely.
|
||||
// Note: the quality property is not set for dev environment, we can use this to determine whether it is dev environment.
|
||||
return (quality === undefined && setting.globalValue === undefined && setting.workspaceValue === undefined) ? true : config[parallelMessageProcessingConfig];
|
||||
return (azdata.env.quality === azdata.env.AppQuality.dev && setting.globalValue === undefined && setting.workspaceValue === undefined) ? true : config[parallelMessageProcessingConfig];
|
||||
}
|
||||
|
||||
export function getLogFileName(prefix: string, pid: number): string {
|
||||
@@ -396,7 +395,3 @@ export async function getOrDownloadServer(config: IConfig, handleServerEvent?: (
|
||||
return serverdownloader.getOrDownloadServer();
|
||||
}
|
||||
|
||||
async function getProductQuality(): Promise<string> {
|
||||
const content = await fs.readFile(path.join(vscode.env.appRoot, 'product.json'));
|
||||
return JSON.parse(content?.toString())?.quality;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,10 @@ import { sendSettingChangedEvent, TelemetryActions, TelemetryReporter, Telemetry
|
||||
|
||||
const STORAGE_IV_KEY = 'queryHistory.storage-iv';
|
||||
const STORAGE_KEY_KEY = 'queryHistory.storage-key';
|
||||
const HISTORY_STORAGE_FILE_NAME = 'queryHistory.bin';
|
||||
// We use a different file for every flavor of ADS because the secret storage is unique per-flavor and so we will have
|
||||
// a different key/IV pair for each flavor with no easy way to transfer/read them. This means that each flavor of ADS
|
||||
// will have its own unique history - even if they're all stored in the same location.
|
||||
const HISTORY_STORAGE_FILE_NAME = azdata.env.quality === azdata.env.AppQuality.stable ? 'queryHistory.bin' : `queryHistory.${azdata.env.quality}.bin`;
|
||||
const STORAGE_ENCRYPTION_ALGORITHM = 'aes-256-ctr';
|
||||
const HISTORY_DEBOUNCE_MS = 10000;
|
||||
const DEFAULT_CAPTURE_ENABLED = true;
|
||||
|
||||
Reference in New Issue
Block a user