Skip to content

Commit fab5344

Browse files
committed
Merge branch 'main' into environments-cache
2 parents 3c251c3 + bb2ed7a commit fab5344

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1689
-1183
lines changed

.vscode/launch.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
"--extensionTestsPath=${workspaceFolder}/out/test"
144144
],
145145
"env": {
146-
"VSC_PYTHON_CI_TEST_GREP": "Language Server:"
146+
"VSC_PYTHON_CI_TEST_GREP": "Language Server:"
147147
},
148148
"stopOnEntry": false,
149149
"sourceMaps": true,
@@ -166,6 +166,7 @@
166166
"env": {
167167
"VSC_PYTHON_CI_TEST_GREP": "", // Modify this to run a subset of the single workspace tests
168168
"VSC_PYTHON_CI_TEST_INVERT_GREP": "", // Initialize this to invert the grep (exclude tests with value defined in grep).
169+
"CI_PYTHON_PATH": "<PythonPath>", // Initialize this to invert the grep (exclude tests with value defined in grep).
169170

170171
"VSC_PYTHON_LOAD_EXPERIMENTS_FROM_FILE": "true",
171172
"TEST_FILES_SUFFIX": "ds.test"

build/ci/templates/globals.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ variables:
1111
npm_config_cache: $(Pipeline.Workspace)/.npm
1212
vmImageMacOS: 'macOS-10.15'
1313
TS_NODE_FILES: true # Temporarily enabled to allow using types from vscode.proposed.d.ts from ts-node (for tests).
14-
VSC_PYTHON_CI_TEST_VSC_CHANNEL: '1.48.0' # Enforce this until https://github.com/microsoft/vscode-test/issues/73 is fixed

build/ci/vscode-python-pr-validation.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ stages:
111111
timeoutInMinutes: 90
112112
strategy:
113113
matrix:
114+
'Unit':
115+
TestsToRun: 'testUnitTests, pythonUnitTests, pythonInternalTools, pythonIPythonTests'
116+
NeedsPythonTestReqs: true
117+
NeedsIPythonReqs: true
114118
# This gives us our best functional coverage for the OS.
115119
'Functional':
116120
TestsToRun: 'testfunctional'

news/1 Enhancements/14090.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Do not opt users out of the insiders program if they have a stable version installed.

news/3 Code Health/14013.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add Windows unit tests to the PR validation pipeline .

src/client/common/insidersBuild/insidersExtensionService.ts

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class InsidersExtensionService implements IExtensionSingleActivationServi
6161
const channel = this.extensionChannelService.getChannel();
6262
const isDefault = this.extensionChannelService.isChannelUsingDefaultConfiguration;
6363

64-
const alreadyHandled = await this.handleEdgeCases(channel, isDefault);
64+
const alreadyHandled = await this.handleEdgeCases(isDefault);
6565
if (!alreadyHandled) {
6666
this.handleChannel(channel).ignoreErrors();
6767
}
@@ -84,14 +84,12 @@ export class InsidersExtensionService implements IExtensionSingleActivationServi
8484
* Choose what to do in miscellaneous situations
8585
* @returns `true` if install channel is handled in these miscellaneous cases, `false` if install channel needs further handling
8686
*/
87-
public async handleEdgeCases(installChannel: ExtensionChannels, isDefault: boolean): Promise<boolean> {
87+
public async handleEdgeCases(isDefault: boolean): Promise<boolean> {
8888
// When running UI Tests we might want to disable these prompts.
8989
if (process.env.UITEST_DISABLE_INSIDERS) {
9090
return true;
9191
} else if (await this.promptToInstallInsidersIfApplicable(isDefault)) {
9292
return true;
93-
} else if (await this.setInsidersChannelToOffIfApplicable(installChannel)) {
94-
return true;
9593
} else {
9694
return false;
9795
}
@@ -115,21 +113,4 @@ export class InsidersExtensionService implements IExtensionSingleActivationServi
115113
await this.insidersPrompt.promptToInstallInsiders();
116114
return true;
117115
}
118-
119-
/**
120-
* When install channel is not in sync with what is installed, resolve discrepency by setting channel to "off"
121-
* @returns `true` if channel is set to off, `false` otherwise
122-
*/
123-
private async setInsidersChannelToOffIfApplicable(installChannel: ExtensionChannels): Promise<boolean> {
124-
if (installChannel === 'off') {
125-
return false;
126-
}
127-
if (this.appEnvironment.extensionChannel !== 'stable') {
128-
return false;
129-
}
130-
131-
// Install channel is set to "weekly" or "daily" but stable version of extension is installed. Switch channel to "off" to use the installed version
132-
await this.extensionChannelService.updateChannel('off');
133-
return true;
134-
}
135116
}

src/client/common/process/internal/python.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function execCode(code: string, isolated = true): string[] {
2828
export function execModule(name: string, moduleArgs: string[], isolated = true): string[] {
2929
const args = ['-m', name, ...moduleArgs];
3030
if (isolated) {
31-
args[0] = ISOLATED.fileToCommandArgument();
31+
args[0] = ISOLATED; // replace
3232
}
3333
// "code" isn't specific enough to know how to parse it,
3434
// so we only return the args.

src/client/common/process/internal/scripts/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ export function shell_exec(command: string, lockfile: string, shellArgs: string[
306306
// We don't bother with a "parse" function since the output
307307
// could be anything.
308308
return [
309-
ISOLATED.fileToCommandArgument(),
309+
ISOLATED,
310310
script,
311311
command.fileToCommandArgument(),
312312
// The shell args must come after the command

src/client/common/utils/decorators.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ export function cache(expiryDurationMs: number) {
178178
* @param {string} [scopeName] Scope for the error message to be logged along with the error.
179179
* @returns void
180180
*/
181-
export function swallowExceptions(scopeName: string) {
181+
export function swallowExceptions(scopeName?: string) {
182182
// tslint:disable-next-line:no-any no-function-expression
183183
return function (_target: any, propertyName: string, descriptor: TypedPropertyDescriptor<any>) {
184184
const originalMethod = descriptor.value!;
185-
const errorMessage = `Python Extension (Error in ${scopeName}, method:${propertyName}):`;
185+
const errorMessage = `Python Extension (Error in ${scopeName || propertyName}, method:${propertyName}):`;
186186
// tslint:disable-next-line:no-any no-function-expression
187187
descriptor.value = function (...args: any[]) {
188188
try {

0 commit comments

Comments
 (0)