Skip to content

Commit e5b779e

Browse files
rchiodoIan HuffDonJayamanne
authored
Port path environment fix to point release. (#6722)
* Fix problems with path not getting picked up during kernel launch (#6518) Co-authored-by: Ian Huff <ianhuff@Ians-MacBook-Pro.local> * Update changelog * Fix tests failures (#6668) * Support for displaying of pyspark kernels (#6579) Co-authored-by: Ian Huff <ianhuff@Ians-MacBook-Pro.local> Co-authored-by: Don Jayamanne <don.jayamanne@outlook.com>
1 parent a59b957 commit e5b779e

31 files changed

Lines changed: 475 additions & 350 deletions

.eslintrc.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ module.exports = {
8080
'src/test/common/experiments/manager.unit.test.ts',
8181
'src/test/common/experiments/telemetry.unit.test.ts',
8282
'src/test/common/platform/filesystem.unit.test.ts',
83-
'src/test/common/platform/pathUtils.functional.test.ts',
8483
'src/test/common/platform/errors.unit.test.ts',
8584
'src/test/common/platform/platformService.test.ts',
8685
'src/test/common/platform/utils.ts',
@@ -110,9 +109,6 @@ module.exports = {
110109
'src/test/common/dotnet/services/macCompatibilityService.unit.test.ts',
111110
'src/test/common/serviceRegistry.unit.test.ts',
112111
'src/test/common/extensions.unit.test.ts',
113-
'src/test/common/variables/envVarsService.functional.test.ts',
114-
'src/test/common/variables/envVarsService.test.ts',
115-
'src/test/common/variables/envVarsService.unit.test.ts',
116112
'src/test/common/variables/serviceRegistry.unit.test.ts',
117113
'src/test/common/variables/environmentVariablesProvider.unit.test.ts',
118114
'src/test/common/nuget/nugetService.unit.test.ts',
@@ -594,11 +590,9 @@ module.exports = {
594590
'src/client/common/platform/fs-temp.ts',
595591
'src/client/common/platform/fs-paths.ts',
596592
'src/client/common/platform/platformService.ts',
597-
'src/client/common/platform/types.ts',
598593
'src/client/common/platform/constants.ts',
599594
'src/client/common/platform/fileSystem.ts',
600595
'src/client/common/platform/registry.ts',
601-
'src/client/common/platform/pathUtils.ts',
602596
'src/client/common/persistentState.ts',
603597
'src/client/common/terminal/activator/base.ts',
604598
'src/client/common/terminal/activator/powershellFailedHandler.ts',
@@ -647,9 +641,7 @@ module.exports = {
647641
'src/client/common/dotnet/services/windowsCompatibilityService.ts',
648642
'src/client/common/logger.ts',
649643
'src/client/common/variables/serviceRegistry.ts',
650-
'src/client/common/variables/environment.ts',
651644
'src/client/common/variables/types.ts',
652-
'src/client/common/variables/environmentVariablesProvider.ts',
653645
'src/client/common/variables/sysTypes.ts',
654646
'src/client/common/variables/systemVariables.ts',
655647
'src/client/common/nuget/azureBlobStoreNugetRepository.ts',

.github/workflows/build-test.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,13 @@ jobs:
766766
- name: Install dependencies (npm ci)
767767
run: npm ci --prefer-offline
768768

769+
- name: Install screen capture dependencies
770+
if: matrix.os == 'ubuntu-latest'
771+
run: sudo apt-get install imagemagick
772+
773+
- name: Install screen capture
774+
run: npm i -D screenshot-desktop
775+
769776
# Check to see if we should build webviews or not
770777
- name: Check if we need to build webviews
771778
if: matrix.test-suite != 'integration' && matrix.test-suite != 'notebookAndWebview'
@@ -920,6 +927,14 @@ jobs:
920927
path: .nyc_output
921928
retention-days: 1
922929

930+
- name: Upload screenshots
931+
uses: actions/upload-artifact@v2
932+
if: always()
933+
with:
934+
name: Screenshots-${{matrix.os}}-${{matrix.pythonVersion}}-${{matrix.python}}-${{matrix.jupyter}}-${{matrix.test-suite}}
935+
path: './${{env.IPYWIDGET_SCREENSHOT_PATH}}'
936+
retention-days: 1
937+
923938
smoke-tests:
924939
timeout-minutes: 30
925940
name: Smoke tests

.vscode/launch.json

Lines changed: 26 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,13 @@
77
"type": "extensionHost",
88
"request": "launch",
99
"runtimeExecutable": "${execPath}",
10-
"args": [
11-
"--extensionDevelopmentPath=${workspaceFolder}",
12-
"--enable-proposed-api"
13-
],
10+
"args": ["--extensionDevelopmentPath=${workspaceFolder}", "--enable-proposed-api"],
1411
"stopOnEntry": false,
1512
"smartStep": true,
1613
"sourceMaps": true,
17-
"outFiles": [
18-
"${workspaceFolder}/out/**/*",
19-
"!${workspaceFolder}/**/node_modules**/*"
20-
],
14+
"outFiles": ["${workspaceFolder}/out/**/*", "!${workspaceFolder}/**/node_modules**/*"],
2115
"preLaunchTask": "Compile",
22-
"skipFiles": [
23-
"<node_internals>/**"
24-
],
16+
"skipFiles": ["<node_internals>/**"],
2517
"env": {
2618
// Disable this to turoff on redux & console logging during debugging
2719
"VSC_JUPYTER_FORCE_LOGGING": "1",
@@ -44,23 +36,16 @@
4436
"type": "extensionHost",
4537
"request": "launch",
4638
"runtimeExecutable": "${execPath}",
47-
"args": [
48-
"--extensionDevelopmentPath=${workspaceFolder}"
49-
],
39+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
5040
"stopOnEntry": false,
5141
"smartStep": true,
5242
"sourceMaps": true,
53-
"outFiles": [
54-
"${workspaceFolder}/out/**/*",
55-
"!${workspaceFolder}/**/node_modules**/*"
56-
],
43+
"outFiles": ["${workspaceFolder}/out/**/*", "!${workspaceFolder}/**/node_modules**/*"],
5744
"preLaunchTask": "Inject DS WebBrowser UI",
5845
"env": {
5946
"VSC_JUPYTER_DS_UI_PROMPT": "1"
6047
},
61-
"skipFiles": [
62-
"<node_internals>/**"
63-
],
48+
"skipFiles": ["<node_internals>/**"],
6449
"presentation": {
6550
"group": "1_extension",
6651
"order": 2
@@ -71,17 +56,11 @@
7156
"type": "extensionHost",
7257
"request": "launch",
7358
"runtimeExecutable": "${execPath}",
74-
"args": [
75-
"--extensionDevelopmentPath=${workspaceFolder}",
76-
"${workspaceFolder}/data"
77-
],
59+
"args": ["--extensionDevelopmentPath=${workspaceFolder}", "${workspaceFolder}/data"],
7860
"stopOnEntry": false,
7961
"smartStep": true,
8062
"sourceMaps": true,
81-
"outFiles": [
82-
"${workspaceFolder}/out/**/*",
83-
"!${workspaceFolder}/**/node_modules**/*"
84-
],
63+
"outFiles": ["${workspaceFolder}/out/**/*", "!${workspaceFolder}/**/node_modules**/*"],
8564
"preLaunchTask": "Compile",
8665
"presentation": {
8766
"group": "1_extension",
@@ -108,14 +87,9 @@
10887
},
10988
"stopOnEntry": false,
11089
"sourceMaps": true,
111-
"outFiles": [
112-
"${workspaceFolder}/out/**/*.js",
113-
"!${workspaceFolder}/**/node_modules**/*"
114-
],
90+
"outFiles": ["${workspaceFolder}/out/**/*.js", "!${workspaceFolder}/**/node_modules**/*"],
11591
"preLaunchTask": "Compile",
116-
"skipFiles": [
117-
"<node_internals>/**"
118-
],
92+
"skipFiles": ["<node_internals>/**"],
11993
"presentation": {
12094
"group": "2_tests",
12195
"order": 10
@@ -137,14 +111,9 @@
137111
},
138112
"stopOnEntry": false,
139113
"sourceMaps": true,
140-
"outFiles": [
141-
"${workspaceFolder}/out/**/*.js",
142-
"!${workspaceFolder}/**/node_modules**/*"
143-
],
114+
"outFiles": ["${workspaceFolder}/out/**/*.js", "!${workspaceFolder}/**/node_modules**/*"],
144115
"preLaunchTask": "preTestJediLSP",
145-
"skipFiles": [
146-
"<node_internals>/**"
147-
],
116+
"skipFiles": ["<node_internals>/**"],
148117
"presentation": {
149118
"group": "2_tests",
150119
"order": 4
@@ -174,14 +143,9 @@
174143
},
175144
"stopOnEntry": false,
176145
"sourceMaps": true,
177-
"outFiles": [
178-
"${workspaceFolder}/out/**/*.js",
179-
"!${workspaceFolder}/**/node_modules**/*"
180-
],
146+
"outFiles": ["${workspaceFolder}/out/**/*.js", "!${workspaceFolder}/**/node_modules**/*"],
181147
"preLaunchTask": "Compile",
182-
"skipFiles": [
183-
"<node_internals>/**"
184-
],
148+
"skipFiles": ["<node_internals>/**"],
185149
"presentation": {
186150
"group": "2_tests",
187151
"order": 5
@@ -216,14 +180,9 @@
216180
},
217181
"stopOnEntry": false,
218182
"sourceMaps": true,
219-
"outFiles": [
220-
"${workspaceFolder}/out/**/*.js",
221-
"!${workspaceFolder}/**/node_modules**/*"
222-
],
183+
"outFiles": ["${workspaceFolder}/out/**/*.js", "!${workspaceFolder}/**/node_modules**/*"],
223184
"preLaunchTask": "Compile",
224-
"skipFiles": [
225-
"<node_internals>/**"
226-
],
185+
"skipFiles": ["<node_internals>/**"],
227186
"presentation": {
228187
"group": "2_tests",
229188
"order": 6
@@ -245,14 +204,9 @@
245204
//"--grep", "<suite name>",
246205
"--timeout=300000"
247206
],
248-
"outFiles": [
249-
"${workspaceFolder}/out/**/*.js",
250-
"!${workspaceFolder}/**/node_modules**/*"
251-
],
207+
"outFiles": ["${workspaceFolder}/out/**/*.js", "!${workspaceFolder}/**/node_modules**/*"],
252208
"preLaunchTask": "Compile",
253-
"skipFiles": [
254-
"<node_internals>/**"
255-
],
209+
"skipFiles": ["<node_internals>/**"],
256210
"presentation": {
257211
"group": "2_tests",
258212
"order": 7
@@ -299,14 +253,9 @@
299253
// Remove 'X' prefix to run with coverage
300254
"XVSC_JUPYTER_INSTRUMENT_CODE_FOR_COVERAGE": "1"
301255
},
302-
"outFiles": [
303-
"${workspaceFolder}/out/**/*.js",
304-
"!${workspaceFolder}/**/node_modules**/*"
305-
],
256+
"outFiles": ["${workspaceFolder}/out/**/*.js", "!${workspaceFolder}/**/node_modules**/*"],
306257
"preLaunchTask": "Compile",
307-
"skipFiles": [
308-
"<node_internals>/**"
309-
],
258+
"skipFiles": ["<node_internals>/**"],
310259
"presentation": {
311260
"group": "2_tests",
312261
"order": 8
@@ -338,14 +287,9 @@
338287
// Remove `X` prefix and update path to test with real python interpreter (for DS functional tests).
339288
"XCI_PYTHON_PATH": "<Python Path>"
340289
},
341-
"outFiles": [
342-
"${workspaceFolder}/out/**/*.js",
343-
"!${workspaceFolder}/**/node_modules**/*"
344-
],
290+
"outFiles": ["${workspaceFolder}/out/**/*.js", "!${workspaceFolder}/**/node_modules**/*"],
345291
"preLaunchTask": "Compile",
346-
"skipFiles": [
347-
"<node_internals>/**"
348-
],
292+
"skipFiles": ["<node_internals>/**"],
349293
"presentation": {
350294
"group": "2_tests",
351295
"order": 9
@@ -356,12 +300,8 @@
356300
"request": "launch",
357301
"name": "Gulp tasks (helpful for debugging gulpfile.js)",
358302
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
359-
"args": [
360-
"compile"
361-
],
362-
"skipFiles": [
363-
"<node_internals>/**"
364-
],
303+
"args": ["checkDependencies"],
304+
"skipFiles": ["<node_internals>/**"],
365305
"presentation": {
366306
"group": "3_misc",
367307
"order": 1
@@ -371,9 +311,7 @@
371311
"name": "Node: Current File",
372312
"program": "${file}",
373313
"request": "launch",
374-
"skipFiles": [
375-
"<node_internals>/**"
376-
],
314+
"skipFiles": ["<node_internals>/**"],
377315
"type": "pwa-node",
378316
"presentation": {
379317
"group": "3_misc",
@@ -386,9 +324,7 @@
386324
"request": "launch",
387325
"module": "IPython",
388326
"console": "integratedTerminal",
389-
"args": [
390-
"${file}"
391-
], // Additional args should be prefixed with a '--' first.
327+
"args": ["${file}"], // Additional args should be prefixed with a '--' first.
392328
"presentation": {
393329
"group": "3_misc",
394330
"order": 3

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# Changelog
22

3+
## 2021.8.1 (19 July 2021)
4+
5+
### Fixes
6+
7+
1. Fix for kernel not starting with correct path (causes DLL load and import modules failures).
8+
([#5833](https://github.com/Microsoft/vscode-jupyter/issues/5833))
9+
10+
### Thanks
11+
12+
Thanks to the following projects which we fully rely on to provide some of
13+
our features:
14+
15+
- [Python Extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
16+
- [debugpy](https://pypi.org/project/debugpy/)
17+
18+
Also thanks to the various projects we provide integrations with which help
19+
make this extension useful:
20+
21+
- [Jupyter](https://jupyter.org/):
22+
[Notebooks](https://jupyter-notebook.readthedocs.io/en/latest/?badge=latest),
23+
[JupyterHub](https://jupyterhub.readthedocs.io/en/stable/),
24+
[ipywidgets](https://ipywidgets.readthedocs.io/en/latest/),
25+
[nbconvert](https://nbconvert.readthedocs.io/en/latest/)
26+
327
## 2021.8.0 (8 July 2021)
428

529
### Enhancements

gulpfile.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
'use strict';
1010

1111
const gulp = require('gulp');
12-
const ts = require('gulp-typescript');
1312
const spawn = require('cross-spawn');
14-
const colors = require('colors/safe');
1513
const path = require('path');
1614
const del = require('del');
1715
const fs = require('fs-extra');
@@ -20,9 +18,9 @@ const nativeDependencyChecker = require('node-has-native-dependencies');
2018
const flat = require('flat');
2119
const { argv } = require('yargs');
2220
const os = require('os');
23-
const { ExtensionRootDir } = require('./build/util');
2421
const isCI = process.env.TF_BUILD !== undefined || process.env.GITHUB_ACTIONS === 'true';
2522
const { downloadRendererExtension } = require('./build/ci/downloadRenderer');
23+
const webpackEnv = { NODE_OPTIONS: '--max_old_space_size=9096' };
2624

2725
gulp.task('compile', async (done) => {
2826
// Use tsc so we can generate source maps that look just like tsc does (gulp-sourcemap does not generate them the same way)
@@ -104,7 +102,6 @@ gulp.task('checkNpmDependencies', (done) => {
104102

105103
gulp.task('compile-ipywidgets', () => buildIPyWidgets());
106104

107-
const webpackEnv = { NODE_OPTIONS: '--max_old_space_size=9096' };
108105

109106
async function buildIPyWidgets() {
110107
// if the output ipywidgest file exists, then no need to re-build.
@@ -130,7 +127,9 @@ gulp.task('compile-viewers', async () => {
130127
// On CI, when running Notebook tests, we don't need old webviews.
131128
// Simple & temporary optimization for the Notebook Test Job.
132129
if (isCI && process.env.VSC_JUPYTER_SKIP_WEBVIEW_BUILD === 'true') {
133-
gulp.task('compile-webviews', async () => {});
130+
gulp.task('compile-webviews', async () => {
131+
// Do nothing, just eliminate js errors
132+
});
134133
} else {
135134
gulp.task(
136135
'compile-webviews',

news/2 Fixes/6316.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Ensure Pyspark kernels are listed.

src/client/common/platform/pathUtils.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,6 @@ export class PathUtils implements IPathUtils {
4040
return this.utils.paths.sep;
4141
}
4242

43-
// eslint-disable-next-line
44-
// TODO: Deprecate in favor of IPlatformService?
45-
public getPathVariableName(): 'Path' | 'PATH' {
46-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
47-
return this.utils.executables.envVar as any;
48-
}
49-
5043
public getDisplayName(pathValue: string, cwd?: string): string {
5144
// Paths on windows can either contain \ or / Both work.
5245
// Thus, C:\Python.exe is the same as C:/Python.exe

src/client/common/platform/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export const IPlatformService = Symbol('IPlatformService');
1515
export interface IPlatformService {
1616
readonly osType: OSType;
1717
osRelease: string;
18-
readonly pathVariableName: 'Path' | 'PATH';
1918
readonly virtualEnvBinName: 'bin' | 'Scripts';
2019

2120
// convenience methods

src/client/common/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ export interface IPathUtils {
104104
* @memberof IPathUtils
105105
*/
106106
readonly separator: string;
107-
getPathVariableName(): 'Path' | 'PATH';
108107
basename(pathValue: string, ext?: string): string;
109108
getDisplayName(pathValue: string, cwd?: string): string;
110109
}

0 commit comments

Comments
 (0)