Skip to content

Commit bef4dba

Browse files
authored
Parcel update and CI improvements (microsoft#136830)
* 🆙 product * 🆙 parcel/watcher * 🆙 parcel/watcher * tests - separate remote logs from others * store server logs too * more tweaks * fix name * error when 10s passed
1 parent 42f10bb commit bef4dba

File tree

15 files changed

+33
-17
lines changed

15 files changed

+33
-17
lines changed

build/azure-pipelines/darwin/product-build-darwin.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ steps:
233233
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
234234
APP_NAME="`ls $APP_ROOT | head -n 1`"
235235
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin" \
236-
yarn smoketest-no-compile --build "$APP_ROOT/$APP_NAME" --remote --screenshots $(Build.SourcesDirectory)/.build/logs/smoke-tests
236+
yarn smoketest-no-compile --build "$APP_ROOT/$APP_NAME" --remote --screenshots $(Build.SourcesDirectory)/.build/logs/smoke-tests-remote
237237
timeoutInMinutes: 5
238238
displayName: Run smoke tests (Remote)
239239
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))

build/azure-pipelines/linux/product-build-linux.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ steps:
220220
set -e
221221
APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
222222
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
223-
yarn smoketest-no-compile --build "$APP_PATH" --remote --electronArgs="--disable-dev-shm-usage --use-gl=swiftshader" --screenshots $(Build.SourcesDirectory)/.build/logs/smoke-tests
223+
yarn smoketest-no-compile --build "$APP_PATH" --remote --electronArgs="--disable-dev-shm-usage --use-gl=swiftshader" --screenshots $(Build.SourcesDirectory)/.build/logs/smoke-tests-remote
224224
timeoutInMinutes: 5
225225
displayName: Run smoke tests (Remote)
226226
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))

build/azure-pipelines/win32/product-build-win32.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ steps:
216216
$ErrorActionPreference = "Stop"
217217
$AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
218218
$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"
219-
exec { yarn smoketest-no-compile --build "$AppRoot" --remote }
219+
exec { yarn smoketest-no-compile --build "$AppRoot" --remote --screenshots $(Build.SourcesDirectory)\.build\logs\smoke-tests-remote }
220220
displayName: Run smoke tests (Remote)
221221
timeoutInMinutes: 5
222222
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))

extensions/vscode-test-resolver/src/extension.ts

+4
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ export function activate(context: vscode.ExtensionContext) {
8383
const commandArgs = ['--port=0', '--disable-telemetry'];
8484
const env = getNewEnv();
8585
const remoteDataDir = process.env['TESTRESOLVER_DATA_FOLDER'] || path.join(os.homedir(), serverDataFolderName || `${dataFolderName}-testresolver`);
86+
const logsDir = process.env['TESTRESOLVER_LOGS_FOLDER'];
87+
if (logsDir) {
88+
commandArgs.push('--logsPath', logsDir);
89+
}
8690

8791
env['VSCODE_AGENT_FOLDER'] = remoteDataDir;
8892
outputChannel.appendLine(`Using data folder at ${remoteDataDir}`);

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
},
6060
"dependencies": {
6161
"@microsoft/applicationinsights-web": "^2.6.4",
62-
"@parcel/watcher": "2.0.0",
62+
"@parcel/watcher": "2.0.1",
6363
"@vscode/sqlite3": "4.0.12",
6464
"@vscode/vscode-languagedetection": "1.0.21",
6565
"applicationinsights": "1.0.8",

remote/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"dependencies": {
66
"@microsoft/applicationinsights-web": "^2.6.4",
7-
"@parcel/watcher": "2.0.0",
7+
"@parcel/watcher": "2.0.1",
88
"@vscode/vscode-languagedetection": "1.0.21",
99
"applicationinsights": "1.0.8",
1010
"cookie": "^0.4.0",

remote/yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@
8383
resolved "https://registry.yarnpkg.com/@microsoft/dynamicproto-js/-/dynamicproto-js-1.1.4.tgz#40e1c0ad20743fcee1604a7df2c57faf0aa1af87"
8484
integrity sha512-Ot53G927ykMF8cQ3/zq4foZtdk+Tt1YpX7aUTHxBU7UHNdkEiBvBfZSq+rnlUmKCJ19VatwPG4mNzvcGpBj4og==
8585

86-
"@parcel/watcher@2.0.0":
87-
version "2.0.0"
88-
resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.0.tgz#ebe992a4838b35c3da9a568eb95a71cb26ddf551"
89-
integrity sha512-ByalKmRRXNNAhwZ0X1r0XeIhh1jG8zgdlvjgHk9ZV3YxiersEGNQkwew+RfqJbIL4gOJfvC2ey6lg5kaeRainw==
86+
"@parcel/watcher@2.0.1":
87+
version "2.0.1"
88+
resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.1.tgz#ec4bb6c43d9588a1ffd3d2abe6df5b501463c62d"
89+
integrity sha512-XegFF4L8sFn1RzU5KKOZxXUuzgOSwd6+X2ez3Cy6MVhYMbiLZ1moceMTqDhuT3N8DNbdumK3zP1wojsIsnX40w==
9090
dependencies:
9191
node-addon-api "^3.2.1"
9292
node-gyp-build "^4.3.0"

resources/server/test/test-remote-integration.bat

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ IF "%VSCODEUSERDATADIR%" == "" (
2121

2222
set REMOTE_VSCODE=%AUTHORITY%%EXT_PATH%
2323
set VSCODECRASHDIR=%~dp0\..\..\..\.build\crashes
24-
set VSCODELOGSDIR=%~dp0\..\..\..\.build\logs\remote-integration-tests
24+
set VSCODELOGSDIR=%~dp0\..\..\..\.build\logs\integration-tests-remote
2525
set TESTRESOLVER_DATA_FOLDER=%TMP%\testresolverdatafolder-%RANDOM%-%TIME:~6,5%
26+
set TESTRESOLVER_LOGS_FOLDER=%VSCODELOGSDIR%\server
2627

2728
if "%VSCODE_REMOTE_SERVER_PATH%"=="" (
2829
echo "Using remote server out of sources for integration tests"

resources/server/test/test-remote-integration.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fi
2929

3030
export REMOTE_VSCODE=$AUTHORITY$EXT_PATH
3131
VSCODECRASHDIR=$ROOT/.build/crashes
32-
VSCODELOGSDIR=$ROOT/.build/logs/remote-integration-tests
32+
VSCODELOGSDIR=$ROOT/.build/logs/integration-tests-remote
3333

3434
# Figure out which Electron to use for running tests
3535
if [ -z "$INTEGRATION_TEST_ELECTRON_PATH" ]
@@ -74,6 +74,7 @@ else
7474
fi
7575

7676
export TESTRESOLVER_DATA_FOLDER=$TESTRESOLVER_DATA_FOLDER
77+
export TESTRESOLVER_LOGS_FOLDER=$VSCODELOGSDIR/server
7778

7879
# Figure out which remote server to use for running tests
7980
if [ -z "$VSCODE_REMOTE_SERVER_PATH" ]

scripts/test-integration.bat

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" (
2626
compile-extension:markdown-language-features^
2727
compile-extension:typescript-language-features^
2828
compile-extension:vscode-custom-editor-tests^
29+
compile-extension:vscode-notebook-tests^
2930
compile-extension:emmet^
3031
compile-extension:css-language-features-server^
3132
compile-extension:html-language-features-server^

scripts/test-integration.sh

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ else
3232
yarn gulp compile-extension:vscode-api-tests \
3333
compile-extension:vscode-colorize-tests \
3434
compile-extension:vscode-custom-editor-tests \
35+
compile-extension:vscode-notebook-tests \
3536
compile-extension:markdown-language-features \
3637
compile-extension:typescript-language-features \
3738
compile-extension:emmet \

src/vs/workbench/services/extensions/electron-browser/localProcessExtensionHost.ts

+2
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,8 @@ export class LocalProcessExtensionHost implements IExtensionHost {
362362
let startupTimeoutHandle: any;
363363
if (!this._environmentService.isBuilt && !this._environmentService.remoteAuthority || this._isExtensionDevHost) {
364364
startupTimeoutHandle = setTimeout(() => {
365+
this._logService.error(`[LocalProcessExtensionHost]: Extension host did not start in 10 seconds (debugBrk: ${this._isExtensionDevDebugBrk})`);
366+
365367
const msg = this._isExtensionDevDebugBrk
366368
? nls.localize('extensionHost.startupFailDebug', "Extension host did not start in 10 seconds, it might be stopped on the first line and needs a debugger to continue.")
367369
: nls.localize('extensionHost.startupFail', "Extension host did not start in 10 seconds, that might be a problem.");

test/automation/src/code.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
128128

129129
const env = { ...process.env };
130130
const codePath = options.codePath;
131+
const logsPath = path.join(repoPath, '.build', 'logs', options.remote ? 'smoke-tests-remote' : 'smoke-tests');
131132
const outPath = codePath ? getBuildOutPath(codePath) : getDevOutPath();
132133

133134
const args = [
@@ -142,7 +143,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
142143
'--disable-workspace-trust',
143144
`--extensions-dir=${options.extensionsPath}`,
144145
`--user-data-dir=${options.userDataDir}`,
145-
`--logsPath=${path.join(repoPath, '.build', 'logs', 'smoke-tests')}`,
146+
`--logsPath=${logsPath}`,
146147
'--driver', handle
147148
];
148149

@@ -170,6 +171,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
170171
}
171172

172173
env['TESTRESOLVER_DATA_FOLDER'] = remoteDataDir;
174+
env['TESTRESOLVER_LOGS_FOLDER'] = path.join(logsPath, 'server');
173175
}
174176

175177
const spawnOptions: cp.SpawnOptions = { env };

test/smoke/src/main.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,11 @@ if (!opts.web) {
163163
quality = Quality.Stable;
164164
}
165165

166-
console.log(`Running desktop smoke tests against ${electronPath}`);
166+
if (opts.remote) {
167+
console.log(`Running desktop remote smoke tests against ${electronPath}`);
168+
} else {
169+
console.log(`Running desktop smoke tests against ${electronPath}`);
170+
}
167171
}
168172

169173
//

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -417,10 +417,10 @@
417417
dependencies:
418418
"@octokit/openapi-types" "^10.2.2"
419419

420-
"@parcel/watcher@2.0.0":
421-
version "2.0.0"
422-
resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.0.tgz#ebe992a4838b35c3da9a568eb95a71cb26ddf551"
423-
integrity sha512-ByalKmRRXNNAhwZ0X1r0XeIhh1jG8zgdlvjgHk9ZV3YxiersEGNQkwew+RfqJbIL4gOJfvC2ey6lg5kaeRainw==
420+
"@parcel/watcher@2.0.1":
421+
version "2.0.1"
422+
resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.1.tgz#ec4bb6c43d9588a1ffd3d2abe6df5b501463c62d"
423+
integrity sha512-XegFF4L8sFn1RzU5KKOZxXUuzgOSwd6+X2ez3Cy6MVhYMbiLZ1moceMTqDhuT3N8DNbdumK3zP1wojsIsnX40w==
424424
dependencies:
425425
node-addon-api "^3.2.1"
426426
node-gyp-build "^4.3.0"

0 commit comments

Comments
 (0)