From b58de21ca1a9371ffe8779919a174e85781cfe5a Mon Sep 17 00:00:00 2001 From: vince-fugnitto Date: Thu, 10 Nov 2022 12:41:47 -0500 Subject: [PATCH] ci: make plugin download sequential The commit updates our CI to run the `download:plugins` script sequentially to improve rate limiting errors. Signed-off-by: vince-fugnitto --- .github/workflows/ci-cd.yml | 15 ++++++++++++++- .gitpod.yml | 2 +- CHANGELOG.md | 1 + dev-packages/cli/src/download-plugins.ts | 2 +- dev-packages/cli/src/theia.ts | 2 +- devfile.yaml | 2 +- package.json | 2 +- 7 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 77a1067b74a01..24e3693697832 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -73,11 +73,24 @@ jobs: with: python-version: '3.x' - - name: Install and Build + - name: Install shell: bash run: | yarn --skip-integrity-check --network-timeout 100000 ./scripts/check_git_status.sh + env: + NODE_OPTIONS: --max_old_space_size=4096 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9 + + - name: Download Plugins + if: runner.os == 'Linux' + shell: bash + run: | + yarn -s download:plugins + + - name: Build + shell: bash + run: | yarn build:examples ./scripts/check_git_status.sh env: diff --git a/.gitpod.yml b/.gitpod.yml index 3b5cdc61eeeb6..a03d38cc692cc 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -12,7 +12,7 @@ ports: - port: 9339 # Node.js debug port onOpen: ignore tasks: - - init: yarn --network-timeout 100000 && yarn build:examples + - init: yarn --network-timeout 100000 && yarn build:examples && yarn download:plugins command: > jwm & yarn --cwd examples/browser start ../.. --hostname=0.0.0.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2728de7e2fcf5..699a8dfe9c130 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - [preferences] `PreferenceHeaderRendererContribution` moved to `preference-node-renderer-creator.ts`. [#11432](https://github.com/eclipse-theia/theia/pull/11432) - [workspace] removed `workspace.supportMultiRootWorkspace` preference [#11538](https://github.com/eclipse-theia/theia/pull/11538) - [workspace] removed method `isMultiRootWorkspaceEnabled` from `WorkspaceService` [#11538](https://github.com/eclipse-theia/theia/pull/11538) +- [repo] the `download:plugins` script resolves plugins sequentially by default [#11860](https://github.com/eclipse-theia/theia/pull/11860) ## v1.31.0 - 10/27/2022 diff --git a/dev-packages/cli/src/download-plugins.ts b/dev-packages/cli/src/download-plugins.ts index 9216a1071688e..4f58970d344cc 100644 --- a/dev-packages/cli/src/download-plugins.ts +++ b/dev-packages/cli/src/download-plugins.ts @@ -86,7 +86,7 @@ export default async function downloadPlugins(options: DownloadPluginsOptions = ignoreErrors = false, apiVersion = DEFAULT_SUPPORTED_API_VERSION, apiUrl = 'https://open-vsx.org/api', - parallel = true, + parallel = false, proxyUrl, proxyAuthorization, strictSsl diff --git a/dev-packages/cli/src/theia.ts b/dev-packages/cli/src/theia.ts index 0ca06caf7ad85..24b6b12c01cae 100644 --- a/dev-packages/cli/src/theia.ts +++ b/dev-packages/cli/src/theia.ts @@ -343,7 +343,7 @@ async function theiaCli(): Promise { 'parallel': { describe: 'Download in parallel', boolean: true, - default: true + default: false }, 'proxy-url': { describe: 'Proxy URL' diff --git a/devfile.yaml b/devfile.yaml index e8f6301c39003..5c026905910a7 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -36,7 +36,7 @@ commands: component: che-dev command: > killall node; - yarn && yarn build:examples + yarn && yarn download:plugins && yarn build:examples workdir: /projects/theia - name: > theia: Launch Browser Backend diff --git a/package.json b/package.json index 9206972b345db..d1b301eb1e158 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "browser": "yarn -s --cwd examples/browser", "build": "yarn -s compile && yarn -s build:examples", "build-p": "yarn -s compile && lerna run --scope=\"@theia/example-*\" bundle --parallel", - "build:examples": "yarn -s download:plugins && lerna run --scope=\"@theia/example-*\" bundle --parallel", + "build:examples": "lerna run --scope=\"@theia/example-*\" bundle --parallel", "clean": "yarn -s rebuild:clean && yarn -s lint:clean && node scripts/run-reverse-topo.js yarn -s clean", "compile": "echo Compiling TypeScript sources... && yarn -s compile:clean && yarn -s compile:tsc", "compile:clean": "ts-clean dev-packages/* packages/*",