Skip to content

Commit

Permalink
Parcel update and CI improvements (#136830)
Browse files Browse the repository at this point in the history
* 🆙 product

* 🆙 parcel/watcher

* 🆙 parcel/watcher

* tests - separate remote logs from others

* store server logs too

* more tweaks

* fix name

* error when 10s passed
  • Loading branch information
bpasero committed Nov 10, 2021
1 parent 42f10bb commit bef4dba
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 17 deletions.
2 changes: 1 addition & 1 deletion build/azure-pipelines/darwin/product-build-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ steps:
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
APP_NAME="`ls $APP_ROOT | head -n 1`"
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin" \
yarn smoketest-no-compile --build "$APP_ROOT/$APP_NAME" --remote --screenshots $(Build.SourcesDirectory)/.build/logs/smoke-tests
yarn smoketest-no-compile --build "$APP_ROOT/$APP_NAME" --remote --screenshots $(Build.SourcesDirectory)/.build/logs/smoke-tests-remote
timeoutInMinutes: 5
displayName: Run smoke tests (Remote)
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/linux/product-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ steps:
set -e
APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
yarn smoketest-no-compile --build "$APP_PATH" --remote --electronArgs="--disable-dev-shm-usage --use-gl=swiftshader" --screenshots $(Build.SourcesDirectory)/.build/logs/smoke-tests
yarn smoketest-no-compile --build "$APP_PATH" --remote --electronArgs="--disable-dev-shm-usage --use-gl=swiftshader" --screenshots $(Build.SourcesDirectory)/.build/logs/smoke-tests-remote
timeoutInMinutes: 5
displayName: Run smoke tests (Remote)
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/win32/product-build-win32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ steps:
$ErrorActionPreference = "Stop"
$AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"
exec { yarn smoketest-no-compile --build "$AppRoot" --remote }
exec { yarn smoketest-no-compile --build "$AppRoot" --remote --screenshots $(Build.SourcesDirectory)\.build\logs\smoke-tests-remote }
displayName: Run smoke tests (Remote)
timeoutInMinutes: 5
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
Expand Down
4 changes: 4 additions & 0 deletions extensions/vscode-test-resolver/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ export function activate(context: vscode.ExtensionContext) {
const commandArgs = ['--port=0', '--disable-telemetry'];
const env = getNewEnv();
const remoteDataDir = process.env['TESTRESOLVER_DATA_FOLDER'] || path.join(os.homedir(), serverDataFolderName || `${dataFolderName}-testresolver`);
const logsDir = process.env['TESTRESOLVER_LOGS_FOLDER'];
if (logsDir) {
commandArgs.push('--logsPath', logsDir);
}

env['VSCODE_AGENT_FOLDER'] = remoteDataDir;
outputChannel.appendLine(`Using data folder at ${remoteDataDir}`);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
},
"dependencies": {
"@microsoft/applicationinsights-web": "^2.6.4",
"@parcel/watcher": "2.0.0",
"@parcel/watcher": "2.0.1",
"@vscode/sqlite3": "4.0.12",
"@vscode/vscode-languagedetection": "1.0.21",
"applicationinsights": "1.0.8",
Expand Down
2 changes: 1 addition & 1 deletion remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"@microsoft/applicationinsights-web": "^2.6.4",
"@parcel/watcher": "2.0.0",
"@parcel/watcher": "2.0.1",
"@vscode/vscode-languagedetection": "1.0.21",
"applicationinsights": "1.0.8",
"cookie": "^0.4.0",
Expand Down
8 changes: 4 additions & 4 deletions remote/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@
resolved "https://registry.yarnpkg.com/@microsoft/dynamicproto-js/-/dynamicproto-js-1.1.4.tgz#40e1c0ad20743fcee1604a7df2c57faf0aa1af87"
integrity sha512-Ot53G927ykMF8cQ3/zq4foZtdk+Tt1YpX7aUTHxBU7UHNdkEiBvBfZSq+rnlUmKCJ19VatwPG4mNzvcGpBj4og==

"@parcel/watcher@2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.0.tgz#ebe992a4838b35c3da9a568eb95a71cb26ddf551"
integrity sha512-ByalKmRRXNNAhwZ0X1r0XeIhh1jG8zgdlvjgHk9ZV3YxiersEGNQkwew+RfqJbIL4gOJfvC2ey6lg5kaeRainw==
"@parcel/watcher@2.0.1":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.1.tgz#ec4bb6c43d9588a1ffd3d2abe6df5b501463c62d"
integrity sha512-XegFF4L8sFn1RzU5KKOZxXUuzgOSwd6+X2ez3Cy6MVhYMbiLZ1moceMTqDhuT3N8DNbdumK3zP1wojsIsnX40w==
dependencies:
node-addon-api "^3.2.1"
node-gyp-build "^4.3.0"
Expand Down
3 changes: 2 additions & 1 deletion resources/server/test/test-remote-integration.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ IF "%VSCODEUSERDATADIR%" == "" (

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

if "%VSCODE_REMOTE_SERVER_PATH%"=="" (
echo "Using remote server out of sources for integration tests"
Expand Down
3 changes: 2 additions & 1 deletion resources/server/test/test-remote-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fi

export REMOTE_VSCODE=$AUTHORITY$EXT_PATH
VSCODECRASHDIR=$ROOT/.build/crashes
VSCODELOGSDIR=$ROOT/.build/logs/remote-integration-tests
VSCODELOGSDIR=$ROOT/.build/logs/integration-tests-remote

# Figure out which Electron to use for running tests
if [ -z "$INTEGRATION_TEST_ELECTRON_PATH" ]
Expand Down Expand Up @@ -74,6 +74,7 @@ else
fi

export TESTRESOLVER_DATA_FOLDER=$TESTRESOLVER_DATA_FOLDER
export TESTRESOLVER_LOGS_FOLDER=$VSCODELOGSDIR/server

# Figure out which remote server to use for running tests
if [ -z "$VSCODE_REMOTE_SERVER_PATH" ]
Expand Down
1 change: 1 addition & 0 deletions scripts/test-integration.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" (
compile-extension:markdown-language-features^
compile-extension:typescript-language-features^
compile-extension:vscode-custom-editor-tests^
compile-extension:vscode-notebook-tests^
compile-extension:emmet^
compile-extension:css-language-features-server^
compile-extension:html-language-features-server^
Expand Down
1 change: 1 addition & 0 deletions scripts/test-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ else
yarn gulp compile-extension:vscode-api-tests \
compile-extension:vscode-colorize-tests \
compile-extension:vscode-custom-editor-tests \
compile-extension:vscode-notebook-tests \
compile-extension:markdown-language-features \
compile-extension:typescript-language-features \
compile-extension:emmet \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ export class LocalProcessExtensionHost implements IExtensionHost {
let startupTimeoutHandle: any;
if (!this._environmentService.isBuilt && !this._environmentService.remoteAuthority || this._isExtensionDevHost) {
startupTimeoutHandle = setTimeout(() => {
this._logService.error(`[LocalProcessExtensionHost]: Extension host did not start in 10 seconds (debugBrk: ${this._isExtensionDevDebugBrk})`);

const msg = this._isExtensionDevDebugBrk
? 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.")
: nls.localize('extensionHost.startupFail', "Extension host did not start in 10 seconds, that might be a problem.");
Expand Down
4 changes: 3 additions & 1 deletion test/automation/src/code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {

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

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

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

env['TESTRESOLVER_DATA_FOLDER'] = remoteDataDir;
env['TESTRESOLVER_LOGS_FOLDER'] = path.join(logsPath, 'server');
}

const spawnOptions: cp.SpawnOptions = { env };
Expand Down
6 changes: 5 additions & 1 deletion test/smoke/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ if (!opts.web) {
quality = Quality.Stable;
}

console.log(`Running desktop smoke tests against ${electronPath}`);
if (opts.remote) {
console.log(`Running desktop remote smoke tests against ${electronPath}`);
} else {
console.log(`Running desktop smoke tests against ${electronPath}`);
}
}

//
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,10 @@
dependencies:
"@octokit/openapi-types" "^10.2.2"

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

0 comments on commit bef4dba

Please sign in to comment.